From 7967f0a33fce02d8c862157ec5c32b25bc144438 Mon Sep 17 00:00:00 2001 From: "Kenneth Perry (thothonegan)" Date: Fri, 13 Jul 2018 15:25:04 -0500 Subject: [PATCH 1/4] FBXImporter: Fix GetUniqueName to return names properly --- code/FBXConverter.cpp | 5 +++-- code/FBXConverter.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index 981203abb..472eb03fb 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -407,14 +407,15 @@ static bool HasName( NodeNameCache &cache, const std::string &name ) { return it != cache.end(); } -void Converter::GetUniqueName( const std::string &name, std::string uniqueName ) { +void Converter::GetUniqueName( const std::string &name, std::string& uniqueName ) { if ( !HasName( mNodeNames, name ) ) { uniqueName = name; + mNodeNames.push_back( uniqueName ); return; } int i( 0 ); - std::string newName; + std::string newName (name); while ( HasName( mNodeNames, newName ) ) { ++i; newName.clear(); diff --git a/code/FBXConverter.h b/code/FBXConverter.h index fca42e8d7..2c0810d94 100644 --- a/code/FBXConverter.h +++ b/code/FBXConverter.h @@ -131,7 +131,7 @@ private: void ConvertCamera( const Camera& cam, const std::string &orig_name ); // ------------------------------------------------------------------------------------------------ - void GetUniqueName( const std::string &name, std::string uniqueName ); + void GetUniqueName( const std::string &name, std::string& uniqueName ); // ------------------------------------------------------------------------------------------------ // this returns unified names usable within assimp identifiers (i.e. no space characters - From 91b30e7e7466f35bffeb7deb420cce212d1cf629 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 14 Jul 2018 12:10:59 +0200 Subject: [PATCH 2/4] Update FBXConverter.cpp simple change to retrigger CI --- code/FBXConverter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index 472eb03fb..862b2817d 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -407,7 +407,7 @@ static bool HasName( NodeNameCache &cache, const std::string &name ) { return it != cache.end(); } -void Converter::GetUniqueName( const std::string &name, std::string& uniqueName ) { +void Converter::GetUniqueName( const std::string &name, std::string &uniqueName ) { if ( !HasName( mNodeNames, name ) ) { uniqueName = name; mNodeNames.push_back( uniqueName ); From 72de09a56253a7badfde363bced85b27abebf029 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 14 Jul 2018 17:08:04 +0200 Subject: [PATCH 3/4] Update FBXConverter.cpp Remove dead code. --- code/FBXConverter.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index 862b2817d..7295f934f 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -73,10 +73,6 @@ using namespace Util; #define CONVERT_FBX_TIME(time) static_cast(time) / 46186158000L -// XXX vc9's debugger won't step into anonymous namespaces -//namespace { - - Converter::Converter( aiScene* out, const Document& doc ) : defaultMaterialIndex() , out( out ) @@ -3101,8 +3097,6 @@ void Converter::TransferDataToScene() } } -//} // !anon - // ------------------------------------------------------------------------------------------------ void ConvertToAssimpScene(aiScene* out, const Document& doc) { From 7cb467da11a44fc6de37020f0288d1c3aa88f792 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 15 Jul 2018 14:55:52 +0200 Subject: [PATCH 4/4] Update FBXConverter.cpp Try to trigger travis. --- code/FBXConverter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index 7295f934f..91f0dc906 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -411,7 +411,7 @@ void Converter::GetUniqueName( const std::string &name, std::string &uniqueName } int i( 0 ); - std::string newName (name); + std::string newName( name ); while ( HasName( mNodeNames, newName ) ) { ++i; newName.clear();