|
@@ -2037,34 +2037,16 @@ void Converter::ConvertAnimations()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-std::string Converter::FixNodeName( const std::string& name )
|
|
|
-{
|
|
|
+std::string Converter::FixNodeName( const std::string& name ) {
|
|
|
// strip Model:: prefix, avoiding ambiguities (i.e. don't strip if
|
|
|
// this causes ambiguities, well possible between empty identifiers,
|
|
|
// such as "Model::" and ""). Make sure the behaviour is consistent
|
|
|
// across multiple calls to FixNodeName().
|
|
|
if ( name.substr( 0, 7 ) == "Model::" ) {
|
|
|
std::string temp = name.substr( 7 );
|
|
|
-
|
|
|
- const NodeNameMap::const_iterator it = node_names.find( temp );
|
|
|
- if ( it != node_names.end() ) {
|
|
|
- if ( !( *it ).second ) {
|
|
|
- return FixNodeName( name + "_" );
|
|
|
- }
|
|
|
- }
|
|
|
- node_names[ temp ] = true;
|
|
|
-
|
|
|
return temp;
|
|
|
}
|
|
|
|
|
|
- const NodeNameMap::const_iterator it = node_names.find( name );
|
|
|
- if ( it != node_names.end() ) {
|
|
|
- if ( ( *it ).second ) {
|
|
|
- return FixNodeName( name + "_" );
|
|
|
- }
|
|
|
- }
|
|
|
- node_names[ name ] = false;
|
|
|
-
|
|
|
return name;
|
|
|
}
|
|
|
|