Class GltfModelExporter.AnimationWriter
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Manages the writing of skeletal animation data to glTF format.
public class GltfModelExporter.AnimationWriterInheritance
object ← GltfModelExporter.AnimationWriter
Constructors
AnimationWriter(Skeleton, FlexController[])
Initializes a new instance of the GltfModelExporter.AnimationWriter class.
public AnimationWriter(Skeleton skeleton, FlexController[] flexControllers)Parameters
skeleton Skeleton
flexControllers FlexController[]
Properties
ComposeAdditive
Gets whether additive animations are composed over the bind pose rather than written as delta tracks.
public bool ComposeAdditive { get; init; }Property Value
bool
ReduceKeyframes
Gets whether keys that linear interpolation of the kept keys reproduces within tolerance are dropped. When false, every frame is written except the inner keys of runs of repeated values.
public bool ReduceKeyframes { get; init; }Property Value
bool
Methods
WriteAnimation(ModelRoot, Node?[], AnimationBase, string?)
Writes a skeletal animation to the glTF model. Null joints, for bones the model lacks (e.g. animation graph clips retargeted by name), are skipped.
public void WriteAnimation(ModelRoot model, Node?[] joints, AnimationBase animation, string? animationName = null)Parameters
model ModelRoot
joints Node?[]
animation AnimationBase
animationName string?
WriteRetargetedAnimation(ModelRoot, Node?[], AnimationBase, string, SkeletonRetargeter)
Writes an animation authored on another skeleton, retargeted onto the model by world pose. Retargeting matches world poses, so an additive animation is composed over the source skeleton's bind pose either way, and taken back to a delta over the model's bind pose when deltas are wanted.
public void WriteRetargetedAnimation(ModelRoot model, Node?[] joints, AnimationBase animation, string animationName, SkeletonRetargeter retargeter)Parameters
model ModelRoot
joints Node?[]
animation AnimationBase
animationName string
retargeter SkeletonRetargeter

