mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
final cleanup
cleanup types cleanout unnecessary vars only aboslutely necessary vars to collada utils remain, for tracking scale and up_axis etc.
This commit is contained in:
parent
684f299e86
commit
aa294b37f6
3 changed files with 25 additions and 21 deletions
|
|
@ -191,14 +191,18 @@ void AssimpAppMesh::lockMesh(F32 t, const MatrixF& objOffset)
|
|||
tmpBoneIndex.setSize(totalWeights);
|
||||
tmpVertexIndex.setSize(totalWeights);
|
||||
|
||||
// Count the total number of weights for all of the bones.
|
||||
Map<String, aiNode*> boneLookup;
|
||||
for (U32 b = 0; b < boneCount; b++) {
|
||||
boneLookup[mMeshData->mBones[b]->mName.C_Str()] =
|
||||
AssimpAppNode::findChildNodeByName(mMeshData->mBones[b]->mName.C_Str(), appNode->mScene->mRootNode);
|
||||
}
|
||||
|
||||
for (U32 b = 0; b < boneCount; b++)
|
||||
{
|
||||
String name = mMeshData->mBones[b]->mName.C_Str();
|
||||
aiNode* nodePtr = AssimpAppNode::findChildNodeByName(mMeshData->mBones[b]->mName.C_Str(), appNode->mScene->mRootNode);
|
||||
if (!nodePtr)
|
||||
bones[b] = new AssimpAppNode(appNode->mScene, appNode->mNode);
|
||||
else
|
||||
bones[b] = new AssimpAppNode(appNode->mScene, nodePtr);
|
||||
const aiBone* bone = mMeshData->mBones[b];
|
||||
aiNode* nodePtr = boneLookup[bone->mName.C_Str()];
|
||||
bones[b] = nodePtr ? new AssimpAppNode(appNode->mScene, nodePtr) : new AssimpAppNode(appNode->mScene, appNode->mNode);
|
||||
|
||||
MatrixF boneTransform;
|
||||
AssimpAppNode::assimpToTorqueMat(mMeshData->mBones[b]->mOffsetMatrix, boneTransform);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue