From 632b2db97c57d2147bf6e8393ba8e35d2b2f4bad Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Wed, 14 Jul 2021 13:39:41 +0100 Subject: [PATCH 1/5] Ensure glTFv2 scene name is unique Use the provided scene name if extant Fixes issue #3978 --- code/AssetLib/glTF2/glTF2Exporter.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/code/AssetLib/glTF2/glTF2Exporter.cpp b/code/AssetLib/glTF2/glTF2Exporter.cpp index 02c3233f3..47780606f 100644 --- a/code/AssetLib/glTF2/glTF2Exporter.cpp +++ b/code/AssetLib/glTF2/glTF2Exporter.cpp @@ -88,15 +88,13 @@ namespace Assimp { } // end of namespace Assimp glTF2Exporter::glTF2Exporter(const char* filename, IOSystem* pIOSystem, const aiScene* pScene, - const ExportProperties* pProperties, bool isBinary) + const ExportProperties* pProperties, bool isBinary) : mFilename(filename) , mIOSystem(pIOSystem) + , mScene(pScene) , mProperties(pProperties) + , mAsset(new Asset(pIOSystem)) { - mScene = pScene; - - mAsset.reset( new Asset( pIOSystem ) ); - // Always on as our triangulation process is aware of this type of encoding mAsset->extensionsUsed.FB_ngon_encoding = true; @@ -1338,8 +1336,11 @@ unsigned int glTF2Exporter::ExportNode(const aiNode* n, Ref& parent) void glTF2Exporter::ExportScene() { - const char* sceneName = "defaultScene"; - Ref scene = mAsset->scenes.Create(sceneName); + // Use the name of the scene if specified + const std::string sceneName = (mScene->mName.length > 0) ? mScene->mName.C_Str() : "defaultScene"; + + // Ensure unique + Ref scene = mAsset->scenes.Create(mAsset->FindUniqueID(sceneName, "")); // root node will be the first one exported (idx 0) if (mAsset->nodes.Size() > 0) { From aa883eda195fd144a27789f69059a8742ad93103 Mon Sep 17 00:00:00 2001 From: Hill Ma Date: Thu, 15 Jul 2021 11:54:55 -0700 Subject: [PATCH 2/5] FBX: fix double precision build. --- code/AssetLib/FBX/FBXExporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/FBX/FBXExporter.cpp b/code/AssetLib/FBX/FBXExporter.cpp index ccff15c15..c19c593dd 100644 --- a/code/AssetLib/FBX/FBXExporter.cpp +++ b/code/AssetLib/FBX/FBXExporter.cpp @@ -1690,7 +1690,7 @@ void FBXExporter::WriteObjects () aiUVTransform trafo; unsigned int max = sizeof(aiUVTransform); - aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE, 0), (float *)&trafo, &max); + aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE, 0), (ai_real *)&trafo, &max); // now write the actual texture node FBX::Node tnode("Texture"); From e13ce4b624728bdcf4475fe511fdbbeab7fc1095 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 21 Jul 2021 09:46:23 +0200 Subject: [PATCH 3/5] Fix version, remove deprecated doc files, fix some path errors --- doc/Doxyfile.in | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index ffe39f9f7..8b1e802d2 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -32,7 +32,7 @@ PROJECT_NAME = Assimp # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = "v4.1. (December 2018)" +PROJECT_NUMBER = "v5.0.1. (December 2020)" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer @@ -197,7 +197,7 @@ SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. -TAB_SIZE = 8 +TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". @@ -663,11 +663,7 @@ WARN_LOGFILE = # with spaces. INPUT = @doxy_main_page@ \ - @PROJECT_SOURCE_DIR@ \ - @PROJECT_BINARY_DIR@ \ - @PROJECT_SOURCE_DIR@/include/ \ - @PROJECT_SOURCE_DIR@/doc/dox.h \ - @PROJECT_SOURCE_DIR@/code/BaseImporter.h + @PROJECT_SOURCE_DIR@/include/ # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -690,28 +686,9 @@ FILE_PATTERNS = *.c \ *.cxx \ *.cpp \ *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ *.inl \ *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py + *.dox # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. @@ -725,7 +702,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = irrXML.h +EXCLUDE = contrib/* # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -739,8 +716,7 @@ EXCLUDE_SYMLINKS = NO # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = */.svn/* \ - */.svn +EXCLUDE_PATTERNS = */.git/* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the From aa8628abef7b766cf75908d0d91f1f11b138c6a1 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 21 Jul 2021 20:38:58 +0200 Subject: [PATCH 4/5] Disable html and enable xml --- doc/Doxyfile.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 8b1e802d2..e499f09ea 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -636,7 +636,7 @@ WARN_IF_DOC_ERROR = YES # wrong or incomplete parameter documentation, but not about the absence of # documentation. -WARN_NO_PARAMDOC = NO +WARN_NO_PARAMDOC = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text @@ -877,7 +877,7 @@ IGNORE_PREFIX = # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. -GENERATE_HTML = YES +GENERATE_HTML = NO # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be @@ -1460,7 +1460,7 @@ MAN_LINKS = NO # generate an XML file that captures the structure of # the code including all documentation. -GENERATE_XML = NO +GENERATE_XML = YES # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be From d554b4950d991caf110819966f852eb712425d08 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 22 Jul 2021 20:48:25 +0200 Subject: [PATCH 5/5] Add hpp to dxygen filter --- doc/Doxyfile.in | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index e499f09ea..54273b90c 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -688,6 +688,7 @@ FILE_PATTERNS = *.c \ *.c++ \ *.inl \ *.h \ + *.hpp \ *.dox # The RECURSIVE tag can be used to turn specify whether or not subdirectories