Merge pull request #1545 from assimp/issue_213

closes https://github.com/assimp/assimp/issues/213: log an error inst…
pull/1549/head^2
Kim Kulling 2017-11-06 00:44:50 +01:00 committed by GitHub
commit 10a6524300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -645,7 +645,6 @@ void Converter::ConvertCameras( const Model& model )
} }
} }
void Converter::ConvertLight( const Model& model, const Light& light ) void Converter::ConvertLight( const Model& model, const Light& light )
{ {
lights.push_back( new aiLight() ); lights.push_back( new aiLight() );
@ -783,7 +782,6 @@ const char* Converter::NameTransformationComp( TransformationComp comp )
return NULL; return NULL;
} }
const char* Converter::NameTransformationCompProperty( TransformationComp comp ) const char* Converter::NameTransformationCompProperty( TransformationComp comp )
{ {
switch ( comp ) switch ( comp )
@ -2239,9 +2237,17 @@ void Converter::ConvertAnimations()
} }
} }
void Converter::RenameNode( const std::string& fixed_name, const std::string& new_name ) {
if ( node_names.find( fixed_name ) == node_names.end() ) {
FBXImporter::LogError( "Cannot rename node " + fixed_name + ", not existing.");
return;
}
if ( node_names.find( new_name ) != node_names.end() ) {
FBXImporter::LogError( "Cannot rename node " + fixed_name + " to " + new_name +", name already existing." );
return;
}
void Converter::RenameNode( const std::string& fixed_name, const std::string& new_name )
{
ai_assert( node_names.find( fixed_name ) != node_names.end() ); ai_assert( node_names.find( fixed_name ) != node_names.end() );
ai_assert( node_names.find( new_name ) == node_names.end() ); ai_assert( node_names.find( new_name ) == node_names.end() );