USkeleton::IsCompatibleMesh

Indexing naming convention

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Animation/Skeleton.h

Include

#include "Animation/Skeleton.h"

Source

/Engine/Source/Runtime/Engine/Private/Animation/Skeleton.cpp

Syntax

bool IsCompatibleMesh
(
    const USkeletalMesh * InSkelMesh
) const

Remarks

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

Returns

true if animation set can play on supplied SkeletalMesh, false if not.

Parameters

Parameter

Description

InSkelMesh

SkeletalMesh to compare the Skeleton against.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss