mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 12:30:31 +00:00
Fixes a crash from importing shapes with unnamed bones.
This commit is contained in:
parent
d094137107
commit
186a44fab3
1 changed files with 4 additions and 1 deletions
|
|
@ -201,7 +201,10 @@ void AssimpAppMesh::lockMesh(F32 t, const MatrixF& objOffset)
|
|||
{
|
||||
String name = mMeshData->mBones[b]->mName.C_Str();
|
||||
aiNode* nodePtr = AssimpAppNode::findChildNodeByName(mMeshData->mBones[b]->mName.C_Str(), appNode->mScene->mRootNode);
|
||||
bones[b] = new AssimpAppNode(appNode->mScene, nodePtr);
|
||||
if (!nodePtr)
|
||||
bones[b] = new AssimpAppNode(appNode->mScene, appNode->mNode);
|
||||
else
|
||||
bones[b] = new AssimpAppNode(appNode->mScene, nodePtr);
|
||||
|
||||
MatrixF boneTransform;
|
||||
AssimpAppNode::assimpToTorqueMat(mMeshData->mBones[b]->mOffsetMatrix, boneTransform);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue