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)
|
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
|
// Now setup the name of the assimp node. The collada name might not be
|
||||||
// FIX: Workaround for XSI calling the instanced visual scene 'untitled' by default.
|
// unique, so we use the collada ID.
|
||||||
if (!pNode->mName.empty() && pNode->mName != "untitled")
|
if (!pNode->mID.empty())
|
||||||
return pNode->mName;
|
|
||||||
else if (!pNode->mID.empty())
|
|
||||||
return pNode->mID;
|
return pNode->mID;
|
||||||
else if (!pNode->mSID.empty())
|
else if (!pNode->mSID.empty())
|
||||||
return pNode->mSID;
|
return pNode->mSID;
|
||||||
|
|
Loading…
Reference in New Issue