Skip to content

Commit

Permalink
Use correct mesh index to load bones
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <[email protected]>
  • Loading branch information
luca-della-vedova committed Jul 27, 2022
1 parent bca8f69 commit 889dc78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion graphics/src/AssimpLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void AssimpLoader::Implementation::RecursiveCreate(const aiScene* _scene, const
// TODO Append to existing skeleton if multiple submeshes?
skeleton->SetNumVertAttached(subMesh.VertexCount());
// Now add the bone weights
for (unsigned boneIdx = 0; boneIdx < _scene->mMeshes[meshIdx]->mNumBones; ++boneIdx)
for (unsigned boneIdx = 0; boneIdx < assimpMesh->mNumBones; ++boneIdx)
{
auto& bone = assimpMesh->mBones[boneIdx];
auto boneNodeName = ToString(bone->mNode->mName);
Expand Down

0 comments on commit 889dc78

Please sign in to comment.