Use unique node names when loading Collada files
parent
c9912fd481
commit
727cffdfb4
|
@ -1903,14 +1903,13 @@ const Collada::Node* ColladaLoader::FindNodeBySID( const Collada::Node* pNode, c
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Finds a proper name for a node derived from the collada-node's properties
|
||||
// Finds a proper unique name for a node derived from the collada-node's properties.
|
||||
// The name must be unique for proper node-bone association.
|
||||
std::string ColladaLoader::FindNameForNode( const Collada::Node* pNode)
|
||||
{
|
||||
// now setup the name of the node. We take the name if not empty, otherwise the collada ID
|
||||
// FIX: Workaround for XSI calling the instanced visual scene 'untitled' by default.
|
||||
if (!pNode->mName.empty() && pNode->mName != "untitled")
|
||||
return pNode->mName;
|
||||
else if (!pNode->mID.empty())
|
||||
// Now setup the name of the assimp node. The collada name might not be
|
||||
// unique, so we use the collada ID.
|
||||
if (!pNode->mID.empty())
|
||||
return pNode->mID;
|
||||
else if (!pNode->mSID.empty())
|
||||
return pNode->mSID;
|
||||
|
|
Loading…
Reference in New Issue