Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Animation/Skeleton.h |
Include |
#include "Animation/Skeleton.h" |
Source |
/Engine/Source/Runtime/Engine/Private/Animation/Skeleton.cpp |
bool IsCompatibleMesh
(
const USkeletalMesh * InSkelMesh
) const
Indexing naming convention
Since this code has indexing to very two distinct array but it can be confusing so I am making it consistency for naming
First index is SkeletalMesh->RefSkeleton index - I call this RefBoneIndex Second index is BoneTree index in USkeleton - I call this TreeBoneIndex Verify to see if we can match this skeleton with the provided SkeletalMesh.
Returns true
if bone hierarchy matches (at least needs to have matching parent)
and if parent chain matches - meaning if bone tree has A->B->C and if ref pose has A->C, it will fail
and if more than 50 % of bones matches
true if animation set can play on supplied SkeletalMesh, false if not.
Parameter |
Description |
---|---|
InSkelMesh |
SkeletalMesh to compare the Skeleton against. |