From dadf5c00206120502928ee948998d3c21944d595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 25 Jul 2019 10:28:09 +0200 Subject: [PATCH 01/22] Fix white ambient in STL loader. A problem that sneaked in from #1293 (f84851e8931fb04e7074d487c91c3b3faa566994) due to insufficient code review, later reported in #2059 but not fixed properly. Having a white ambient practically means all other color information is ignored and the model stays bright white no matter how you set up your lighting, so putting it back to how it was before the commit above. --- code/STL/STLLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/STL/STLLoader.cpp b/code/STL/STLLoader.cpp index c7144e444..199a84a44 100644 --- a/code/STL/STLLoader.cpp +++ b/code/STL/STLLoader.cpp @@ -225,7 +225,7 @@ void STLImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS } pcMat->AddProperty(&clrDiffuse,1,AI_MATKEY_COLOR_DIFFUSE); pcMat->AddProperty(&clrDiffuse,1,AI_MATKEY_COLOR_SPECULAR); - clrDiffuse = aiColor4D( ai_real(1.0), ai_real(1.0), ai_real(1.0), ai_real(1.0)); + clrDiffuse = aiColor4D( ai_real(0.05), ai_real(0.05), ai_real(0.05), ai_real(1.0)); pcMat->AddProperty(&clrDiffuse,1,AI_MATKEY_COLOR_AMBIENT); pScene->mNumMaterials = 1; From e05ece2eec2a52eee44dd6ac5dfd5f05a96be239 Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Thu, 25 Jul 2019 11:12:06 +0100 Subject: [PATCH 02/22] Add Exporter Unit Test output to gitignore --- test/.gitignore | 3 +++ test/models/PLY/cube_test.ply | 24 ------------------------ test/unit/utAssbinImportExport.cpp | 4 ++-- test/unit/utObjImportExport.cpp | 6 +++--- test/unit/utPLYImportExport.cpp | 2 +- 5 files changed, 9 insertions(+), 30 deletions(-) create mode 100644 test/.gitignore delete mode 100644 test/models/PLY/cube_test.ply diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 000000000..b652d6aae --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,3 @@ +# Ignore Unit Test Output files + +*_out.* diff --git a/test/models/PLY/cube_test.ply b/test/models/PLY/cube_test.ply deleted file mode 100644 index eef7cd426..000000000 --- a/test/models/PLY/cube_test.ply +++ /dev/null @@ -1,24 +0,0 @@ -ply -format ascii 1.0 -comment Created by Open Asset Import Library - http://assimp.sf.net (v4.1.649942190) -element vertex 8 -property float x -property float y -property float z -element face 6 -property list uchar int vertex_index -end_header -0 0 0 -0 0 1 -0 1 1 -0 1 0 -1 0 0 -1 0 1 -1 1 1 -1 1 0 -4 0 1 2 3 -4 7 6 5 4 -4 0 4 5 1 -4 1 5 6 2 -4 2 6 7 3 -4 3 7 4 0 diff --git a/test/unit/utAssbinImportExport.cpp b/test/unit/utAssbinImportExport.cpp index 6def04796..63c22cfea 100644 --- a/test/unit/utAssbinImportExport.cpp +++ b/test/unit/utAssbinImportExport.cpp @@ -58,8 +58,8 @@ public: const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure ); Exporter exporter; - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "assbin", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin" ) ); - const aiScene *newScene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin", aiProcess_ValidateDataStructure ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "assbin", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.assbin" ) ); + const aiScene *newScene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.assbin", aiProcess_ValidateDataStructure ); return newScene != nullptr; } diff --git a/test/unit/utObjImportExport.cpp b/test/unit/utObjImportExport.cpp index bb0d36b13..e00cd2075 100644 --- a/test/unit/utObjImportExport.cpp +++ b/test/unit/utObjImportExport.cpp @@ -205,8 +205,8 @@ protected: ::Assimp::Exporter exporter; const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure ); EXPECT_NE( nullptr, scene ); - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.obj" ) ); - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "objnomtl", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_nomtl_test.obj" ) ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_out.obj" ) ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "objnomtl", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_nomtl_out.obj" ) ); return true; } @@ -263,7 +263,7 @@ TEST_F( utObjImportExport, issue809_vertex_color_Test ) { #ifndef ASSIMP_BUILD_NO_EXPORT ::Assimp::Exporter exporter; - EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/test.obj" ) ); + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "obj", ASSIMP_TEST_MODELS_DIR "/OBJ/test_out.obj" ) ); #endif // ASSIMP_BUILD_NO_EXPORT } diff --git a/test/unit/utPLYImportExport.cpp b/test/unit/utPLYImportExport.cpp index bb8ba64d9..17d1b28de 100644 --- a/test/unit/utPLYImportExport.cpp +++ b/test/unit/utPLYImportExport.cpp @@ -71,7 +71,7 @@ public: Exporter exporter; const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/PLY/cube.ply", aiProcess_ValidateDataStructure); EXPECT_NE(nullptr, scene); - EXPECT_EQ(aiReturn_SUCCESS, exporter.Export(scene, "ply", ASSIMP_TEST_MODELS_DIR "/PLY/cube_test.ply")); + EXPECT_EQ(aiReturn_SUCCESS, exporter.Export(scene, "ply", ASSIMP_TEST_MODELS_DIR "/PLY/cube_out.ply")); return true; } From 7e8a3ec4cbdedf85d21c6dc994c3fed7bd1c4e6e Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Thu, 25 Jul 2019 13:38:49 +0100 Subject: [PATCH 03/22] Add unit test of valid and unique Exporter IDs, rename assjson id "json" is a very vague exporter ID, change to "assjson" Add a unit test to ensure all exporter have unique IDs and that they all have an ID, description and extension --- code/Assjson/json_exporter.cpp | 9 ------ code/Common/Exporter.cpp | 6 ++-- .../ImportExport/utAssjsonImportExport.cpp | 2 +- test/unit/ImportExport/utExporter.cpp | 29 +++++++++++++++++++ 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/code/Assjson/json_exporter.cpp b/code/Assjson/json_exporter.cpp index cd542b29e..e9fa72496 100644 --- a/code/Assjson/json_exporter.cpp +++ b/code/Assjson/json_exporter.cpp @@ -34,15 +34,6 @@ namespace Assimp { void ExportAssimp2Json(const char*, Assimp::IOSystem*, const aiScene*, const Assimp::ExportProperties*); -Exporter::ExportFormatEntry Assimp2Json_desc = Assimp::Exporter::ExportFormatEntry( - "json", - "Plain JSON representation of the Assimp scene data structure", - "json", - &ExportAssimp2Json, - 0u -); - - // small utility class to simplify serializing the aiScene to Json class JSONWriter { public: diff --git a/code/Common/Exporter.cpp b/code/Common/Exporter.cpp index 87745bca9..acff29399 100644 --- a/code/Common/Exporter.cpp +++ b/code/Common/Exporter.cpp @@ -167,7 +167,7 @@ Exporter::ExportFormatEntry gExporters[] = #endif #ifndef ASSIMP_BUILD_NO_ASSXML_EXPORTER - Exporter::ExportFormatEntry( "assxml", "Assxml Document", "assxml" , &ExportSceneAssxml, 0 ), + Exporter::ExportFormatEntry( "assxml", "Assimp XML Document", "assxml" , &ExportSceneAssxml, 0 ), #endif #ifndef ASSIMP_BUILD_NO_X3D_EXPORTER @@ -183,8 +183,8 @@ Exporter::ExportFormatEntry gExporters[] = Exporter::ExportFormatEntry( "3mf", "The 3MF-File-Format", "3mf", &ExportScene3MF, 0 ), #endif -#ifndef ASSIMP_BUILD_NO_Assjson_EXPORTER - Exporter::ExportFormatEntry("json", "Plain JSON representation of the Assimp scene data structure", "json", &ExportAssimp2Json, 0) +#ifndef ASSIMP_BUILD_NO_ASSJSON_EXPORTER + Exporter::ExportFormatEntry( "assjson", "Assimp JSON Document", "json", &ExportAssimp2Json, 0) #endif }; diff --git a/test/unit/ImportExport/utAssjsonImportExport.cpp b/test/unit/ImportExport/utAssjsonImportExport.cpp index 20a2a9e24..82dbf8b57 100644 --- a/test/unit/ImportExport/utAssjsonImportExport.cpp +++ b/test/unit/ImportExport/utAssjsonImportExport.cpp @@ -57,7 +57,7 @@ public: const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure); Exporter exporter; - aiReturn res = exporter.Export(scene, "json", "./spider_test.json"); + aiReturn res = exporter.Export(scene, "assjson", "./spider_test.json"); return aiReturn_SUCCESS == res; } }; diff --git a/test/unit/ImportExport/utExporter.cpp b/test/unit/ImportExport/utExporter.cpp index c46a55b00..4635be2a4 100644 --- a/test/unit/ImportExport/utExporter.cpp +++ b/test/unit/ImportExport/utExporter.cpp @@ -71,3 +71,32 @@ TEST_F(ExporterTest, ProgressHandlerTest) { TestProgressHandler *ph(new TestProgressHandler); exporter.SetProgressHandler(ph); } + +// Make sure all the registered exporters have useful descriptions +TEST_F(ExporterTest, ExporterIdTest) { + Exporter exporter; + size_t exportFormatCount = exporter.GetExportFormatCount(); + EXPECT_NE(0, exportFormatCount) << "No registered exporters"; + typedef std::map ExportIdMap; + ExportIdMap exporterMap; + for (size_t i = 0; i < exportFormatCount; ++i) + { + // Check that the exporter description exists and makes sense + const aiExportFormatDesc* desc = exporter.GetExportFormatDescription(i); + ASSERT_NE(nullptr, desc) << "Missing aiExportFormatDesc at index " << i; + EXPECT_NE(nullptr, desc->id) << "Null exporter ID at index " << i; + EXPECT_STRNE("", desc->id) << "Empty exporter ID at index " << i; + EXPECT_NE(nullptr, desc->description) << "Null exporter description at index " << i; + EXPECT_STRNE("", desc->description) << "Empty exporter description at index " << i; + EXPECT_NE(nullptr, desc->fileExtension) << "Null exporter file extension at index " << i; + EXPECT_STRNE("", desc->fileExtension) << "Empty exporter file extension at index " << i; + + // Check the ID is unique + std::string key(desc->id); + std::pair result = exporterMap.emplace(key, desc); + EXPECT_TRUE(result.second) << "Duplicate exported id: '" << key << "' " << desc->description << " *." << desc->fileExtension << " at index " << i; + } + + const aiExportFormatDesc* desc = exporter.GetExportFormatDescription(exportFormatCount); + EXPECT_EQ(nullptr, desc) << "More exporters than claimed"; +} From 57a56b7b1d390a7ab0b8e93aaf6a2f01a0254725 Mon Sep 17 00:00:00 2001 From: ywang Date: Thu, 25 Jul 2019 13:14:54 -0700 Subject: [PATCH 04/22] extra layer for multi uv sets --- code/FBX/FBXExporter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 08f4bdbc9..ae742dd5d 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -1219,6 +1219,16 @@ void FBXExporter::WriteObjects () layer.AddChild(le); layer.Dump(outstream, binary, indent); + for(unsigned int lr = 1; lr < m->GetNumUVChannels(); ++ lr) + { + FBX::Node layerExtra("Layer", int32_t(1)); + layerExtra.AddChild("Version", int32_t(100)); + FBX::Node leExtra("LayerElement"); + leExtra.AddChild("Type", "LayerElementUV"); + leExtra.AddChild("TypedIndex", int32_t(lr)); + layerExtra.AddChild(leExtra); + layerExtra.Dump(outstream, binary, indent); + } // finish the node record indent = 1; n.End(outstream, binary, indent, true); From 5a7c226c30506e5317a16200cb04f4dc6fdfd619 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 09:51:20 -0700 Subject: [PATCH 05/22] set->unordered_set;unsigned int for iteration From 8fc899035c747da7d4f0530a9fdd8e139b67c721 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:27:59 -0700 Subject: [PATCH 06/22] customize error rate for bind pose --- code/FBX/FBXExporter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 08f4bdbc9..f25b4f135 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -68,6 +68,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include //wangyi + // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure @@ -1840,7 +1842,10 @@ void FBXExporter::WriteObjects () // this should be the same as the bone's mOffsetMatrix. // if it's not the same, the skeleton isn't in the bind pose. - const float epsilon = 1e-4f; // some error is to be expected + float epsilon = 1e-4f; // some error is to be expected +#ifdef ASSIMP_CUSTOM_BINDPOSE_ERR + epsilon = ASSIMP_CUSTOM_BINDPOSE_ERR; +#endif bool bone_xform_okay = true; if (b && ! tr.Equal(b->mOffsetMatrix, epsilon)) { not_in_bind_pose.insert(b); From 079e522eaeca98573cf0e379c321fd69f976286d Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:29:50 -0700 Subject: [PATCH 07/22] clean up --- code/FBX/FBXExporter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index f25b4f135..5367a8525 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -68,8 +68,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include //wangyi - // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From 9b2aac8c96aa020fefb49ecec26513a117046764 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Thu, 11 Jul 2019 17:00:47 -0700 Subject: [PATCH 08/22] use ExportProperties to customize bind pose epsilon --- code/FBX/FBXExporter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 5367a8525..915b4aca7 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -67,6 +67,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ @@ -1841,9 +1842,9 @@ void FBXExporter::WriteObjects () // this should be the same as the bone's mOffsetMatrix. // if it's not the same, the skeleton isn't in the bind pose. float epsilon = 1e-4f; // some error is to be expected -#ifdef ASSIMP_CUSTOM_BINDPOSE_ERR - epsilon = ASSIMP_CUSTOM_BINDPOSE_ERR; -#endif + float epsilon_custom = mProperties->GetPropertyFloat("BINDPOSE_EPSILON", -1); + if(epsilon_custom > 0) + epsilon = epsilon_custom; bool bone_xform_okay = true; if (b && ! tr.Equal(b->mOffsetMatrix, epsilon)) { not_in_bind_pose.insert(b); From c597e21b67a62584c2bb813769f59f1686fcccf5 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:27:59 -0700 Subject: [PATCH 09/22] customize error rate for bind pose --- code/FBX/FBXExporter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 915b4aca7..7419f3d15 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -69,6 +69,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include //wangyi + // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From 6e6765cae35a55a1fccdd2ac5e97d668b93d2d29 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:29:50 -0700 Subject: [PATCH 10/22] clean up --- code/FBX/FBXExporter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 7419f3d15..915b4aca7 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -69,8 +69,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include //wangyi - // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From 0ed91589080f53b7ec66fa4324b1b37c523d5801 Mon Sep 17 00:00:00 2001 From: ywang Date: Mon, 15 Jul 2019 15:52:45 -0700 Subject: [PATCH 11/22] update --- code/FBX/FBXExporter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 915b4aca7..dc17fc885 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -67,7 +67,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ From 029338940c79198f1b78db121fe2d1e794e5b1b6 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:27:59 -0700 Subject: [PATCH 12/22] customize error rate for bind pose --- code/FBX/FBXExporter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index dc17fc885..2ecd3177d 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -68,6 +68,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include +#include //wangyi + // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From 2ddb00f4e066db9721972c43b8bdeebfe3760711 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:29:50 -0700 Subject: [PATCH 13/22] clean up --- code/FBX/FBXExporter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 2ecd3177d..dc17fc885 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -68,8 +68,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include //wangyi - // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From f9f408690e1081fbf338e6c39e4ff93c7b5158cb Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Thu, 11 Jul 2019 17:00:47 -0700 Subject: [PATCH 14/22] use ExportProperties to customize bind pose epsilon --- code/FBX/FBXExporter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index dc17fc885..915b4aca7 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -67,6 +67,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ From 0f0454c3b7cae51fee7790f6945ce50d7ce4ae57 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Wed, 10 Jul 2019 16:27:59 -0700 Subject: [PATCH 15/22] customize error rate for bind pose --- code/FBX/FBXExporter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 915b4aca7..f6dd4ab1b 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -69,6 +69,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include + // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From aaaa0a02a382ad11150b04288e21ef05bfc35901 Mon Sep 17 00:00:00 2001 From: thomasbiang Date: Thu, 11 Jul 2019 17:00:47 -0700 Subject: [PATCH 16/22] use ExportProperties to customize bind pose epsilon --- code/FBX/FBXExporter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index f6dd4ab1b..ffc4cd145 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -70,6 +70,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include + // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From a6b06ad811f7d022a9e97185b733cb444490dcbe Mon Sep 17 00:00:00 2001 From: ywang Date: Mon, 15 Jul 2019 15:52:45 -0700 Subject: [PATCH 17/22] update --- code/FBX/FBXExporter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index ffc4cd145..1f856e8b2 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -67,7 +67,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include From d8eaf0bc7fa54e1f1927eb0740ed3a132d6b16eb Mon Sep 17 00:00:00 2001 From: ywang Date: Thu, 25 Jul 2019 15:53:57 -0700 Subject: [PATCH 18/22] cleanup empty lines --- code/FBX/FBXExporter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index 1f856e8b2..dc17fc885 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -68,8 +68,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include - - // RESOURCES: // https://code.blender.org/2013/08/fbx-binary-file-format-specification/ // https://wiki.blender.org/index.php/User:Mont29/Foundation/FBX_File_Structure From 72e18ed4aaab85c78bae22b27216e563858ebd17 Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Fri, 26 Jul 2019 09:10:09 +0100 Subject: [PATCH 19/22] Fix Travis CI sign-compare warning EXPECT_* triggers sign compare error with literal 0 and unsigned Use 0u literal with size_t --- test/unit/ImportExport/utExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/ImportExport/utExporter.cpp b/test/unit/ImportExport/utExporter.cpp index 4635be2a4..43e711cb3 100644 --- a/test/unit/ImportExport/utExporter.cpp +++ b/test/unit/ImportExport/utExporter.cpp @@ -76,7 +76,7 @@ TEST_F(ExporterTest, ProgressHandlerTest) { TEST_F(ExporterTest, ExporterIdTest) { Exporter exporter; size_t exportFormatCount = exporter.GetExportFormatCount(); - EXPECT_NE(0, exportFormatCount) << "No registered exporters"; + EXPECT_NE(0u, exportFormatCount) << "No registered exporters"; typedef std::map ExportIdMap; ExportIdMap exporterMap; for (size_t i = 0; i < exportFormatCount; ++i) From 73914cd7e29f8bd0dc814024c9ef451d1748a8ca Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 26 Jul 2019 10:55:28 +0200 Subject: [PATCH 20/22] Update FBXExporter.cpp small reformatting improvement --- code/FBX/FBXExporter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/FBX/FBXExporter.cpp b/code/FBX/FBXExporter.cpp index dc17fc885..7d979be9b 100644 --- a/code/FBX/FBXExporter.cpp +++ b/code/FBX/FBXExporter.cpp @@ -1842,8 +1842,10 @@ void FBXExporter::WriteObjects () // if it's not the same, the skeleton isn't in the bind pose. float epsilon = 1e-4f; // some error is to be expected float epsilon_custom = mProperties->GetPropertyFloat("BINDPOSE_EPSILON", -1); - if(epsilon_custom > 0) + if(epsilon_custom > 0) { epsilon = epsilon_custom; + } + bool bone_xform_okay = true; if (b && ! tr.Equal(b->mOffsetMatrix, epsilon)) { not_in_bind_pose.insert(b); From 7fc4cf155295392c868edbfa68e8a651bddd7960 Mon Sep 17 00:00:00 2001 From: RichardTea Date: Fri, 26 Jul 2019 22:17:24 +0100 Subject: [PATCH 21/22] ASSIMP_BUILD_NO_*_EXPORTER Full fix for #2557 These macros should be all-caps. Correct the cmakelists --- code/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index a8a514f73..78c8a5c93 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -810,7 +810,7 @@ ADD_ASSIMP_IMPORTER( MMD MMD/MMDVmdParser.h ) -ADD_ASSIMP_EXPORTER( Assjson +ADD_ASSIMP_EXPORTER( ASSJSON Assjson/cencode.c Assjson/cencode.h Assjson/json_exporter.cpp From d83af910959dd8f50814e85e8459fa1614026d63 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 29 Jul 2019 09:03:29 +0200 Subject: [PATCH 22/22] Update Exporter.cpp Add exporter detail. --- code/Common/Exporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/Common/Exporter.cpp b/code/Common/Exporter.cpp index acff29399..090b561ae 100644 --- a/code/Common/Exporter.cpp +++ b/code/Common/Exporter.cpp @@ -163,7 +163,7 @@ Exporter::ExportFormatEntry gExporters[] = #endif #ifndef ASSIMP_BUILD_NO_ASSBIN_EXPORTER - Exporter::ExportFormatEntry( "assbin", "Assimp Binary", "assbin" , &ExportSceneAssbin, 0 ), + Exporter::ExportFormatEntry( "assbin", "Assimp Binary File", "assbin" , &ExportSceneAssbin, 0 ), #endif #ifndef ASSIMP_BUILD_NO_ASSXML_EXPORTER