Class AnimGraphModelInfo
Namespace: ValveResourceFormat.IO
Assembly: ValveResourceFormat.dll
Resolves human-readable names (bones, sequences, weight lists, IK chains, feet, attachments, look-at chains) for an animation graph from its referenced model. Shared by the animation graph extractor and the GUI graph viewer so the model-introspection logic lives in one place.
public sealed class AnimGraphModelInfoInheritance
Remarks
The referenced model is supplied lazily through a provider so each owner keeps control of its loading and disposal; this type only reads from it.
Constructors
AnimGraphModelInfo(IFileLoader, Func<Resource?>)
Initializes a new instance of the class.
public AnimGraphModelInfo(IFileLoader fileLoader, Func<Resource?> resourceProvider)Parameters
fileLoader IFileLoader
Loader used to resolve animations referenced by the model.
resourceProvider Func<Resource?>
Lazily returns the referenced model resource (or null).
Methods
FindMatchingAttachmentName(KVObject)
Resolves the model attachment that matches a compiled attachment, by name when available or otherwise by comparing bone influences. Returns empty when no match is found.
public string FindMatchingAttachmentName(KVObject compiledAttachment)Parameters
compiledAttachment KVObject
Returns
FindMatchingLookAtChainName(KVObject)
Finds the model look-at chain whose bones match the compiled m_bones collection.
public string FindMatchingLookAtChainName(KVObject compiledBones)Parameters
compiledBones KVObject
Returns
GetBoneName(int)
Returns the bone name at the given skeleton index, or empty when out of range.
public string GetBoneName(int boneIndex)Parameters
boneIndex int
Returns
GetBoneNamesFromIndices(KVObject)
Returns the bone names referenced by a compiled m_bones collection.
public string[] GetBoneNamesFromIndices(KVObject compiledBones)Parameters
compiledBones KVObject
Returns
string[]
GetFootName(int)
Returns the foot name at the given index, or empty when out of range.
public string GetFootName(int footIndex)Parameters
footIndex int
Returns
GetIKChainName(int)
Returns the IK chain name at the given index, or empty when out of range.
public string GetIKChainName(int ikChainIndex)Parameters
ikChainIndex int
Returns
GetIKChainNameByBoneIndices(int, int, int)
Finds the IK chain whose three joints match the given fixed/middle/end bone indices.
public string GetIKChainNameByBoneIndices(int fixedBoneIndex, int middleBoneIndex, int endBoneIndex)Parameters
fixedBoneIndex int
middleBoneIndex int
endBoneIndex int
Returns
GetSequenceName(long)
Returns the sequence name, falling back to a generated placeholder.
public string GetSequenceName(long sequenceIndex)Parameters
sequenceIndex long
Returns
GetWeightListName(long)
Returns the weight list (bone mask) name, falling back to a generated placeholder.
public string GetWeightListName(long weightListIndex)Parameters
weightListIndex long

