- Bugfix: IrrXML loader ignores trailing whitespace on closing tags now
- Bugfix: Collada loader now filters bone vertex weights with weight zero - blame XSI collada export. - Bugfix: Collada animation resolver now also considers IDs when searching for nodes by name git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@460 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
3f2fa97f18
commit
98e53f976e
|
@ -644,12 +644,16 @@ aiMesh* ColladaLoader::CreateMesh( const ColladaParser& pParser, const Collada::
|
||||||
|
|
||||||
float weight = ReadFloat( weightsAcc, weights, vertexIndex, 0);
|
float weight = ReadFloat( weightsAcc, weights, vertexIndex, 0);
|
||||||
|
|
||||||
|
// one day I gonna kill that XSI Collada exporter
|
||||||
|
if( weight > 0.0f)
|
||||||
|
{
|
||||||
aiVertexWeight w;
|
aiVertexWeight w;
|
||||||
w.mVertexId = a - pStartVertex;
|
w.mVertexId = a - pStartVertex;
|
||||||
w.mWeight = weight;
|
w.mWeight = weight;
|
||||||
dstBones[jointIndex].push_back( w);
|
dstBones[jointIndex].push_back( w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// count the number of bones which influence vertices of the current submesh
|
// count the number of bones which influence vertices of the current submesh
|
||||||
size_t numRemainingBones = 0;
|
size_t numRemainingBones = 0;
|
||||||
|
@ -1364,7 +1368,7 @@ void ColladaLoader::CollectNodes( const aiNode* pNode, std::vector<const aiNode*
|
||||||
// Finds a node in the collada scene by the given name
|
// Finds a node in the collada scene by the given name
|
||||||
const Collada::Node* ColladaLoader::FindNode( const Collada::Node* pNode, const std::string& pName)
|
const Collada::Node* ColladaLoader::FindNode( const Collada::Node* pNode, const std::string& pName)
|
||||||
{
|
{
|
||||||
if( pNode->mName == pName)
|
if( pNode->mName == pName || pNode->mID == pName)
|
||||||
return pNode;
|
return pNode;
|
||||||
|
|
||||||
for( size_t a = 0; a < pNode->mChildren.size(); ++a)
|
for( size_t a = 0; a < pNode->mChildren.size(); ++a)
|
||||||
|
|
|
@ -425,6 +425,10 @@ private:
|
||||||
while(*P != L'>')
|
while(*P != L'>')
|
||||||
++P;
|
++P;
|
||||||
|
|
||||||
|
// remove trailing whitespace, if any
|
||||||
|
while( isspace( P[-1]))
|
||||||
|
--P;
|
||||||
|
|
||||||
NodeName = core::string<char_type>(pBeginClose, (int)(P - pBeginClose));
|
NodeName = core::string<char_type>(pBeginClose, (int)(P - pBeginClose));
|
||||||
++P;
|
++P;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue