Class SequenceAnimation
Namespace: ValveResourceFormat.ResourceTypes.ModelAnimation
Assembly: ValveResourceFormat.dll
Represents a sequence-based model animation with frame data, events, and movement information.
public sealed class SequenceAnimation : AnimationBaseInheritance
object ← AnimationBase ← SequenceAnimation
Inherited Members
AnimationBase.Name, AnimationBase.Fps, AnimationBase.FrameCount, AnimationBase.Duration, AnimationBase.CycleFrames, AnimationBase.CycleDuration, AnimationBase.GetCyclePosition(float), AnimationBase.SnapTimeToFrame(float), AnimationBase.GetNearestFrame(float), AnimationBase.GetCycleFraction(float), AnimationBase.IsAdditive, AnimationBase.HasFlexData, AnimationBase.TargetSkeletonName, AnimationBase.GetAdditiveDelta(int, FrameBone), AnimationBase.ComposeAdditiveOverBindPose(FrameBone[], Skeleton), AnimationBase.DecodeFrame(Frame), AnimationBase.HasMovementData(), AnimationBase.GetMovementOffsetData(float), AnimationBase.GetMovementOffsetData(int), AnimationBase.GetRootMotionDelta(float, float), AnimationBase.ToString()
Properties
Activities
Gets the activities associated with this animation.
public AnimationActivity[] Activities { get; }Property Value
AnimGraphAdditive
Gets a value indicating whether the animation graph plays this animation additively (m_bAnimGraphAdditive, present in newer engine branches).
public bool AnimGraphAdditive { get; }Property Value
bool
AutoLayers
Gets the auto layer data for this animation. Empty for animations that were constructed without sequence data.
public AnimationAutoLayer[] AutoLayers { get; }Property Value
Autoplay
Gets Autoplay value of animation sequence. False for animations constructed without animation sequence data.
public bool Autoplay { get; init; }Property Value
bool
BlendReferenceNames
Gets the name each entry of AnimationFetch.LocalReferenceArray resolves to against the sequence group's shared name array, in blend order. Empty when not a blend.
public string[] BlendReferenceNames { get; }Property Value
string[]
BoneMaskName
Gets the name of the bone mask this sequence plays with. Empty for the default mask.
public string BoneMaskName { get; }Property Value
string
Delta
Gets a value indicating whether this is a delta animation.
public bool Delta { get; init; }Property Value
bool
Events
Gets the events defined in this animation.
public AnimationEvent[] Events { get; }Property Value
Fetch
Gets fetch data for this animation. Null for animations that were constructed without sequence data.
public AnimationFetch? Fetch { get; }Property Value
FromSequence
Gets whether this animation was constructed from sequence data.
public bool FromSequence { get; }Property Value
bool
HasFlexData
Gets whether decoding this animation writes any flex controller data.
public override bool HasFlexData { get; }Property Value
bool
Hidden
Gets a value indicating whether the animation is hidden.
public bool Hidden { get; init; }Property Value
bool
IsBlend
Gets whether this sequence blends several animations along a pose parameter.
public bool IsBlend { get; }Property Value
bool
IsLooping
Gets a value indicating whether the animation loops.
public bool IsLooping { get; }Property Value
bool
LocalHierarchy
Gets the local-hierarchy overrides of this animation (bones interpolated in another bone's or model space for a frame range, e.g. a weapon detaching in a death animation).
public AnimationLocalHierarchy[] LocalHierarchy { get; }Property Value
Movements
Gets the movement data for this animation.
public AnimationMovement[] Movements { get; }Property Value
PoseParameterNames
Gets the name each dimension of AnimationFetch.LocalPose resolves to against the sequence group's pose parameter array, row then column. Empty where a dimension names none.
public string[] PoseParameterNames { get; }Property Value
string[]
Realtime
Gets LegacyRealtime value of animation sequence. False for animations constructed without animation sequence data.
public bool Realtime { get; init; }Property Value
bool
ReferencedAnimationName
Gets the name the first entry of AnimationFetch.LocalReferenceArray resolves to against the sequence group's shared name array: the animation this sequence plays.
public string ReferencedAnimationName { get; }Property Value
string
SequenceParams
Gets the sequence parameters for this animation.
public AnimationSequenceParams SequenceParams { get; }Property Value
Worldspace
Gets a value indicating whether this animation is in world space.
public bool Worldspace { get; init; }Property Value
bool
Methods
DecodeFrame(Frame)
Decodes animation data for the specified frame.
public override void DecodeFrame(Frame outFrame)Parameters
outFrame Frame
FromData(KVObject, KVObject, Skeleton, FlexController[])
Creates animation instances from the provided animation data and decode key.
public static IEnumerable<SequenceAnimation> FromData(KVObject animationData, KVObject decodeKey, Skeleton skeleton, FlexController[] flexControllers)Parameters
animationData KVObject
decodeKey KVObject
skeleton Skeleton
flexControllers FlexController[]
Returns
IEnumerable<SequenceAnimation>
FromResource(Resource, KVObject, Skeleton, FlexController[])
Creates animation instances from a resource file.
public static IEnumerable<SequenceAnimation> FromResource(Resource resource, KVObject decodeKey, Skeleton skeleton, FlexController[] flexControllers)Parameters
resource Resource
decodeKey KVObject
skeleton Skeleton
flexControllers FlexController[]
Returns
IEnumerable<SequenceAnimation>
FromSequenceData(KVObject, KVObject, KVObject, Skeleton, FlexController[])
Creates animation instances from sequence data (ASEQ) and animation data (ANIM). This method uses sequence descriptors from ASEQ for names and metadata, while getting frame data from animations in ANIM that the sequences reference.
public static IEnumerable<SequenceAnimation> FromSequenceData(KVObject sequenceData, KVObject animationData, KVObject decodeKey, Skeleton skeleton, FlexController[] flexControllers)Parameters
sequenceData KVObject
animationData KVObject
decodeKey KVObject
skeleton Skeleton
flexControllers FlexController[]
Returns
IEnumerable<SequenceAnimation>
GetAdditiveDelta(int, FrameBone)
Sequences decode into a bind-pose frame and only write the channels they animate (see SequenceAnimation.BuildAnimatedChannels), so a channel the animation leaves alone holds the bind pose rather than a delta, and has to be neutralized before it is composed onto a pose.
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
GetScaledBones()
Returns the bones this animation writes a scale for, empty when it leaves every bone at its rest scale.
public int[] GetScaledBones()Returns
int[]
HasMovementData()
Determines whether this animation has movement data.
public override bool HasMovementData()Returns
bool
HasNonZeroMovementData()
Determines whether any movement segment actually moves. Compiled animations often carry segments that are all zero, which behave the same as having no movement at all.
public bool HasNonZeroMovementData()Returns
bool

