Class ClipAnimation
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly: ValveResourceFormat.dll
Represents a model animation backed by an animation graph clip.
public sealed class ClipAnimation : AnimationInheritance
object ← Animation ← ClipAnimation
Inherited Members
Animation.Name, Animation.Fps, Animation.FrameCount, Animation.Duration, Animation.CycleFrames, Animation.CycleDuration, Animation.GetCyclePosition(float), Animation.SnapTimeToFrame(float), Animation.IsAdditive, Animation.HasFlexData, Animation.TargetSkeletonName, Animation.GetAdditiveDelta(int, FrameBone), Animation.ComposeAdditiveOverBindPose(FrameBone[], Skeleton), Animation.DecodeFrame(Frame), Animation.HasMovementData(), Animation.GetMovementOffsetData(float), Animation.GetMovementOffsetData(int), Animation.GetRootMotionDelta(float, float), Animation.ToString()
Constructors
ClipAnimation(AnimationClip)
Initializes a new instance of the class from an animation clip.
public ClipAnimation(AnimationClip clip)Parameters
clip AnimationClip
Properties
Clip
Gets the animation clip data for ModelAnimation2 format.
public AnimationClip Clip { get; }Property Value
Duration
Gets the duration of the animation in seconds, which is also the period looping playback wraps around.
public override float Duration { get; }Property Value
Remarks
Taken from the clip itself, rather than derived from the frame rate that was derived from it.
Events
Gets the events on this animation's timeline, ordered by start time. Times are in seconds. Consumers filter for the event types they are interested in (e.g. ).
public NmClipEvent[] Events { get; }Property Value
Methods
DecodeFrame(Frame)
Decodes animation data for the specified frame.
public override void DecodeFrame(Frame outFrame)Parameters
outFrame Frame
GetAdditiveDelta(int, FrameBone)
A decoded clip bone is already the delta: clips store one for every bone, un-animated ones included, and their scale is authored around zero.
public override FrameBone GetAdditiveDelta(int boneIndex, FrameBone bone)Parameters
boneIndex int
bone FrameBone
Returns
GetMovementOffsetData(float)
Returns interpolated root motion data at the specified time.
public override AnimationMovement.MovementData GetMovementOffsetData(float time)Parameters
time float
Returns
AnimationMovement.MovementData
GetMovementOffsetData(int)
Returns interpolated root motion data at the specified frame.
public override AnimationMovement.MovementData GetMovementOffsetData(int frame)Parameters
frame int
Returns
AnimationMovement.MovementData
HasMovementData()
Determines whether this animation has movement data.
public override bool HasMovementData()
