FBX-Importer: remove unused lookup tables for nodes.

This commit is contained in:
Kim Kulling
2018-03-31 18:10:29 +02:00
parent f3cc2f79fc
commit c9bb3592ff
2 changed files with 1 additions and 23 deletions

View File

@@ -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;
}