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 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
Methods
WriteAnimation(ModelRoot, Node?[], Animation, string?)
Writes a skeletal animation to the glTF model. Entries in joints may be null when an animation targets a skeleton with bones the exported model does not have (e.g. animation graph clips retargeted by bone name); those bones are skipped.
public void WriteAnimation(ModelRoot model, Node?[] joints, Animation animation, string? animationName = null)Parameters
model ModelRoot
joints Node?[]
animation Animation
animationName string?
WriteRetargetedAnimation(ModelRoot, Node?[], Animation, 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, Animation animation, string animationName, SkeletonRetargeter retargeter)Parameters
model ModelRoot
joints Node?[]
animation Animation
animationName string
retargeter SkeletonRetargeter

