Plugins/Assimp: Fix handling of attachments nodes
This commit is contained in:
parent
cc1246dcac
commit
3de7297bd8
|
|
@ -506,7 +506,16 @@ std::shared_ptr<Nz::SubMesh> ProcessSubMesh(const std::filesystem::path& originP
|
|||
for (unsigned int boneIndex = 0; boneIndex < meshData->mNumBones; ++boneIndex)
|
||||
{
|
||||
const aiBone* bone = meshData->mBones[boneIndex];
|
||||
unsigned int jointIndex = Nz::Retrieve(boneToJointIndex, bone);
|
||||
|
||||
auto it = boneToJointIndex.find(bone);
|
||||
if (it == boneToJointIndex.end())
|
||||
{
|
||||
// Some nodes are not attached to vertices but may influence other nodes or serve as attachment points
|
||||
assert(bone->mNumWeights == 0);
|
||||
continue;
|
||||
}
|
||||
|
||||
unsigned int jointIndex = it->second;
|
||||
|
||||
for (unsigned int weightIndex = 0; weightIndex < bone->mNumWeights; ++weightIndex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue