Class NmClipEvent
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation2
Assembly: ValveResourceFormat.dll
An event embedded in an animation clip (m_events). Typed subclasses exist for the classes with known consumers (, , ,
); other classes are represented by this base with their raw data availablethrough . Consumers filter the event array for the types they are interested in.
public class NmClipEvent : IAnimationEventInheritance
Derived
NmIDEvent, NmLegacyEvent, NmParticleEvent, NmSoundEvent
Implements
Constructors
NmClipEvent(KVObject, float)
Initializes the properties every event class has. Event times are stored in the resource as normalized fractions of the clip; they are converted to seconds using clipDuration.
protected NmClipEvent(KVObject eventData, float clipDuration)Parameters
eventData KVObject
clipDuration float
Properties
ClassName
Gets the runtime class name, e.g. "CNmSoundEvent".
public string ClassName { get; }Property Value
Data
Gets the raw event data, for properties not surfaced by the typed subclasses.
public KVObject Data { get; }Property Value
KVObject
Duration
Gets the duration in seconds of the event window. Zero means a single point in time.
public float Duration { get; }Property Value
StartCycle
Gets the position of the event as a fraction of the animation, zero being its start and one its end. This is what playback is sampled against, so the two formats compare in the same space.
public float StartCycle { get; }Property Value
Remarks
Clips author their event times as this cycle, is derived from it.
StartTime
Gets the time in seconds into the clip at which the event starts.
public float StartTime { get; }Property Value
SyncId
Gets the sync ID used by the animation system to align clips, empty when unused.
public string SyncId { get; }Property Value
Methods
Build(KVObject, float)
Creates a typed clip event from its resource data.
public static NmClipEvent Build(KVObject eventData, float clipDuration)Parameters
eventData KVObject
clipDuration float
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
A string that represents the current object.
Remarks
Returns the event class name and its time window.

