mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Fixes a crash from importing shapes with unnamed bones.
This commit is contained in:
parent
7c2baf51d6
commit
d8bfe6073f
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();
|
String name = mMeshData->mBones[b]->mName.C_Str();
|
||||||
aiNode* nodePtr = AssimpAppNode::findChildNodeByName(mMeshData->mBones[b]->mName.C_Str(), appNode->mScene->mRootNode);
|
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;
|
MatrixF boneTransform;
|
||||||
AssimpAppNode::assimpToTorqueMat(mMeshData->mBones[b]->mOffsetMatrix, boneTransform);
|
AssimpAppNode::assimpToTorqueMat(mMeshData->mBones[b]->mOffsetMatrix, boneTransform);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue