Bugfix: apply transformation as well when filtering out empty proxy nodes in XFile imports. Thanks to Magnus Norddahl for the patch
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1028 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
323b9d8400
commit
2de55ee880
|
@ -1441,7 +1441,7 @@ void XFileParser::FilterHierarchy( XFile::Node* pNode)
|
|||
// if the node has just a single unnamed child containing a mesh, remove
|
||||
// the anonymous node inbetween. The 3DSMax kwXport plugin seems to produce this
|
||||
// mess in some cases
|
||||
if( pNode->mChildren.size() == 1)
|
||||
if( pNode->mChildren.size() == 1 && pNode->mMeshes.empty() )
|
||||
{
|
||||
XFile::Node* child = pNode->mChildren.front();
|
||||
if( child->mName.length() == 0 && child->mMeshes.size() > 0)
|
||||
|
@ -1451,6 +1451,9 @@ void XFileParser::FilterHierarchy( XFile::Node* pNode)
|
|||
pNode->mMeshes.push_back( child->mMeshes[a]);
|
||||
child->mMeshes.clear();
|
||||
|
||||
// transfer the transform as well
|
||||
pNode->mTrafoMatrix = pNode->mTrafoMatrix * child->mTrafoMatrix;
|
||||
|
||||
// then kill it
|
||||
delete child;
|
||||
pNode->mChildren.clear();
|
||||
|
|
Loading…
Reference in New Issue