- 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user