- Bugfix: XFileLoader does not generate dummy bone arrays anymore. Had screwed HasBones()-Test in the viewer, making bone-less objects vanish from view

- made HasFooBar()-checks more precise on the way
- cleared up everyone's destructors to also delete arrays if the corresponding mNumFoo member was zero. This hopefully does not break all too much
- Bugfix: meshes without bones now properly show up with DisableMaterials enabled

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@230 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
ulfjorensen
2008-11-04 17:21:08 +00:00
parent 562050cf6d
commit 195d9a9cb1
5 changed files with 80 additions and 87 deletions
+5 -3
View File
@@ -371,9 +371,11 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
// store the bones in the mesh
mesh->mNumBones = (unsigned int)newBones.size();
mesh->mBones = new aiBone*[mesh->mNumBones];
for( unsigned int c = 0; c < newBones.size(); c++)
mesh->mBones[c] = newBones[c];
if( newBones.size() > 0)
{
mesh->mBones = new aiBone*[mesh->mNumBones];
std::copy( newBones.begin(), newBones.end(), mesh->mBones);
}
}
}