Created
February 27, 2019 17:17
-
-
Save phr34k/6abff39a1f08746628999f9363d7137a to your computer and use it in GitHub Desktop.
ColladaLoader.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string ColladaLoader::FindNameForNode( const Collada::Node* pNode) | |
{ | |
// If explicitly requested, just use the collada name. | |
if (useColladaName) | |
{ | |
if (!pNode->mName.empty()) { | |
return pNode->mName; | |
} else { | |
return format() << "$ColladaAutoName$_" << mNodeNameCounter++; | |
} | |
} | |
else | |
{ | |
// 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; | |
else | |
{ | |
// No need to worry. Unnamed nodes are no problem at all, except | |
// if cameras or lights need to be assigned to them. | |
return format() << "$ColladaAutoName$_" << mNodeNameCounter++; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment