Class AnimationClip
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation2
Assembly: ValveResourceFormat.dll
Represents an animation clip with compressed pose data.
public class AnimationClip : BinaryKV3Inheritance
object ← Block ← BinaryKV3 ← AnimationClip
Inherited Members
BinaryKV3.Type, BinaryKV3.MAGIC0, BinaryKV3.MAGIC1, BinaryKV3.MAGIC2, BinaryKV3.MAGIC3, BinaryKV3.MAGIC4, BinaryKV3.MAGIC5, BinaryKV3.IsBinaryKV3(uint), BinaryKV3.Data, BinaryKV3.SerializationVersion, BinaryKV3.SerializationCompressionMethod, BinaryKV3.Read(BinaryReader), BinaryKV3.WriteText(IndentedTextWriter), BinaryKV3.ConvertBinaryKV3ToText(nint, int), BinaryKV3.Serialize(Stream), Block.Type, Block.Offset, Block.Size, Block.Resource, Block.Read(BinaryReader), Block.ToString(), Block.WriteText(IndentedTextWriter), Block.Serialize(Stream)
Extension Methods
ResourceDataExtensions.AsKeyValueCollection(Block)
Properties
CompressedPoseData
Gets the compressed pose data.
public byte[] CompressedPoseData { get; }Property Value
byte[]
CompressedPoseOffsets
Gets the offsets (in 16-bit / ushort units) into the compressed pose data for each frame.
public int[] CompressedPoseOffsets { get; }Property Value
int[]
Duration
Gets the duration of the animation in seconds.
public float Duration { get; }Property Value
float
Events
Gets the events fired during playback of this clip, ordered by start time. Times are in seconds. Consumers filter for the event types they are interested in (e.g. SoundEvent).
public Event[] Events { get; }Property Value
Event[]
FloatCurves
Gets the clip's named scalar channels (float curves), decoded per frame.
public AnimationFloatCurve[] FloatCurves { get; }Property Value
IsAdditive
Gets a value indicating whether this clip contains transforms that are to be blended additively.
public bool IsAdditive { get; }Property Value
bool
ModelSpaceBoneSamplingIndices
Gets the bones sampled in model space, as indices into AnimationClip.ModelSpaceSamplingChain.
public int[] ModelSpaceBoneSamplingIndices { get; }Property Value
int[]
ModelSpaceSamplingChain
Gets the chain of bones evaluated to sample bones in model space.
public ModelSpaceSamplingChainLink[] ModelSpaceSamplingChain { get; }Property Value
Name
Gets the name of the animation clip.
public string Name { get; }Property Value
string
NumFrames
Gets the number of frames in the animation.
public int NumFrames { get; }Property Value
int
RootMotion
Gets the accumulated root motion per frame (position plus unwrapped yaw in degrees). Empty when the clip stores no root motion; static clips store a single identity placeholder, which is treated as no root motion.
public AnimationMovement.MovementData[] RootMotion { get; }Property Value
AnimationMovement.MovementData[]
RootMotionData
Gets the root motion as stored, which AnimationClip.RootMotion is derived from.
public RootMotionData RootMotionData { get; }Property Value
SecondaryAnimations
Gets the secondary animations associated with this clip.
public AnimationClip[] SecondaryAnimations { get; }Property Value
SkeletonName
Gets the name of the skeleton this animation is for.
public string SkeletonName { get; }Property Value
string
SyncTrack
Gets the sync track of the clip.
public SyncTrack SyncTrack { get; }Property Value
TrackCompressionSettings
Gets the compression settings for each animation track.
public TrackCompressionSetting[] TrackCompressionSettings { get; }Property Value
Methods
Read(BinaryReader)
Reads the block data from a binary reader.
public override void Read(BinaryReader reader)Parameters
reader BinaryReader
The binary reader to read from.
ReadFrame(int, FrameBone[])
Reads and decompresses a specific frame of animation data into the provided bone array.
public void ReadFrame(int frameIndex, FrameBone[] bones)Parameters
frameIndex int
The index of the frame to read.
bones FrameBone[]
The array of bones to populate with frame data.

