From e893248e7c88b7c2133ee2201d89d729091bd545 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Sun, 1 Jan 2023 13:27:16 -0500 Subject: [PATCH 01/11] Fix several spelling mistakes & a comment --- code/AssetLib/Collada/ColladaExporter.cpp | 4 ++-- code/AssetLib/Collada/ColladaExporter.h | 2 +- code/AssetLib/Collada/ColladaHelper.h | 2 +- code/CMakeLists.txt | 4 ++-- include/assimp/Importer.hpp | 2 +- include/assimp/config.h.in | 6 +++--- include/assimp/material.h | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/AssetLib/Collada/ColladaExporter.cpp b/code/AssetLib/Collada/ColladaExporter.cpp index 401d4a2a2..29b714bd7 100644 --- a/code/AssetLib/Collada/ColladaExporter.cpp +++ b/code/AssetLib/Collada/ColladaExporter.cpp @@ -448,7 +448,7 @@ void ColladaExporter::WriteLight(size_t pIndex) { PushTag(); switch (light->mType) { case aiLightSource_AMBIENT: - WriteAmbienttLight(light); + WriteAmbientLight(light); break; case aiLightSource_DIRECTIONAL: WriteDirectionalLight(light); @@ -543,7 +543,7 @@ void ColladaExporter::WriteSpotLight(const aiLight *const light) { mOutput << startstr << "" << endstr; } -void ColladaExporter::WriteAmbienttLight(const aiLight *const light) { +void ColladaExporter::WriteAmbientLight(const aiLight *const light) { const aiColor3D &color = light->mColorAmbient; mOutput << startstr << "" << endstr; diff --git a/code/AssetLib/Collada/ColladaExporter.h b/code/AssetLib/Collada/ColladaExporter.h index 7288dce54..e372a5c5c 100644 --- a/code/AssetLib/Collada/ColladaExporter.h +++ b/code/AssetLib/Collada/ColladaExporter.h @@ -101,7 +101,7 @@ protected: void WritePointLight(const aiLight *const light); void WriteDirectionalLight(const aiLight *const light); void WriteSpotLight(const aiLight *const light); - void WriteAmbienttLight(const aiLight *const light); + void WriteAmbientLight(const aiLight *const light); /// Writes the controller library void WriteControllerLibrary(); diff --git a/code/AssetLib/Collada/ColladaHelper.h b/code/AssetLib/Collada/ColladaHelper.h index 2930f5108..c5b6a2d13 100644 --- a/code/AssetLib/Collada/ColladaHelper.h +++ b/code/AssetLib/Collada/ColladaHelper.h @@ -666,7 +666,7 @@ struct ChannelEntry { const Collada::Accessor *mTimeAccessor; ///> Collada accessor to the time values const Collada::Data *mTimeData; ///> Source data array for the time values const Collada::Accessor *mValueAccessor; ///> Collada accessor to the key value values - const Collada::Data *mValueData; ///> Source datat array for the key value values + const Collada::Data *mValueData; ///> Source data array for the key value values ChannelEntry() : mChannel(), diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 8f26d2daf..a098f3e85 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -270,8 +270,8 @@ if (NOT ASSIMP_NO_EXPORT) # ASSIMP_BUILD_XXX_EXPORTER to TRUE for each exporter OPTION(ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT "default value of all ASSIMP_BUILD_XXX_EXPORTER values" TRUE) - # macro to add the CMake Option ADD_ASSIMP_IMPORTER_ which enables compile of loader - # this way selective loaders can be compiled (reduces filesize + compile time) + # macro to add the CMake Option ADD_ASSIMP_EXPORTER_ which enables compilation of an exporter + # this way selective exporters can be compiled (reduces filesize + compile time) MACRO(ADD_ASSIMP_EXPORTER name) IF (ASSIMP_NO_EXPORT) set(ASSIMP_EXPORTER_ENABLED FALSE) diff --git a/include/assimp/Importer.hpp b/include/assimp/Importer.hpp index 05a15139a..418643f1f 100644 --- a/include/assimp/Importer.hpp +++ b/include/assimp/Importer.hpp @@ -113,7 +113,7 @@ namespace Assimp { * If you need the Importer to do custom file handling to access the files, * implement IOSystem and IOStream and supply an instance of your custom * IOSystem implementation by calling SetIOHandler() before calling ReadFile(). -* If you do not assign a custion IO handler, a default handler using the +* If you do not assign a custom IO handler, a default handler using the * standard C++ IO logic will be used. * * @note One Importer instance is not thread-safe. If you use multiple diff --git a/include/assimp/config.h.in b/include/assimp/config.h.in index a348bc36a..ad16fa88c 100644 --- a/include/assimp/config.h.in +++ b/include/assimp/config.h.in @@ -241,7 +241,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // --------------------------------------------------------------------------- /** * @brief Configures the #aiProcess_FindDegenerates to check the area of a - * trinagle to be greates than e-6. If this is not the case the triangle will + * triangle to be greater than e-6. If this is not the case the triangle will * be removed if #AI_CONFIG_PP_FD_REMOVE is set to true. */ #define AI_CONFIG_PP_FD_CHECKAREA \ @@ -662,7 +662,7 @@ enum aiComponent "AI_CONFIG_FBX_CONVERT_TO_M" // --------------------------------------------------------------------------- -/** @brief Will enable the skeleton structo to store bone data. +/** @brief Will enable the skeleton struct to store bone data. * * This will decouple the bone coupling to the mesh. This feature is * experimental. @@ -1083,7 +1083,7 @@ enum aiComponent #define AI_CONFIG_EXPORT_BLOB_NAME "EXPORT_BLOB_NAME" /** - * @brief Specifies a gobal key factor for scale, float value + * @brief Specifies a global key factor for scale, float value */ #define AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY "GLOBAL_SCALE_FACTOR" diff --git a/include/assimp/material.h b/include/assimp/material.h index 0052888d1..80551e53d 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -306,7 +306,7 @@ enum aiTextureType { aiTextureType_SHEEN = 19, /** Clearcoat - * Simulates a layer of 'polish' or 'laquer' layered on top of a PBR substrate + * Simulates a layer of 'polish' or 'lacquer' layered on top of a PBR substrate * https://autodesk.github.io/standard-surface/#closures/coating * https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_clearcoat */ From 465566a87edc837a9712ca247acffddd4be99349 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Tue, 3 Jan 2023 05:04:25 -0500 Subject: [PATCH 02/11] {cmake} Remove dead code BUILD_LIB_TYPE isn't used anywhere. I think the intent with "add_definitions" here was to affect cmake (?), but it's actually just adding "#define DDL_STATIC_LIBRARY OFF" which isn't used in the code anywhere. --- CMakeLists.txt | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3288a18f0..e613a43cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -388,14 +388,6 @@ IF (NOT TARGET uninstall AND ASSIMP_INSTALL) ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") ENDIF() -# cmake configuration files -if(${BUILD_SHARED_LIBS}) - set(BUILD_LIB_TYPE SHARED) -else() - set(BUILD_LIB_TYPE STATIC) - add_definitions(-DDDL_STATIC_LIBRARY=OFF) -endif() - IF( UNIX ) # Use GNUInstallDirs for Unix predefined directories INCLUDE(GNUInstallDirs) From df8a9bb2b83161d6ac68c1df2e511c4c89d1fa40 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 3 Jan 2023 21:11:09 +0100 Subject: [PATCH 03/11] Fix: Fix signed unsigned mismatch - closes https://github.com/assimp/assimp/issues/4854 --- include/assimp/scene.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/assimp/scene.h b/include/assimp/scene.h index f6dfd82b0..9b173f939 100644 --- a/include/assimp/scene.h +++ b/include/assimp/scene.h @@ -433,7 +433,7 @@ struct aiScene for (unsigned int i = 0; i < mNumTextures; i++) { const char* shortTextureFilename = GetShortFilename(mTextures[i]->mFilename.C_Str()); if (strcmp(shortTextureFilename, shortFilename) == 0) { - return std::make_pair(mTextures[i], i); + return std::make_pair(mTextures[i], static_cast(i)); } } return std::make_pair(nullptr, -1); From 96b071bdb1965084c6e78073f9f42a872300f308 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 4 Jan 2023 09:19:37 +0100 Subject: [PATCH 04/11] Fix: Fix possible division by zero - closes https://github.com/assimp/assimp/issues/4860 --- code/AssetLib/LWO/LWOAnimation.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/AssetLib/LWO/LWOAnimation.cpp b/code/AssetLib/LWO/LWOAnimation.cpp index f729f84b1..7ebbfb810 100644 --- a/code/AssetLib/LWO/LWOAnimation.cpp +++ b/code/AssetLib/LWO/LWOAnimation.cpp @@ -162,8 +162,11 @@ void AnimResolver::UpdateAnimRangeSetup() { const double my_last = (*it).keys.back().time; const double delta = my_last - my_first; + if (delta == 0.0) { + continue; + } + const size_t old_size = (*it).keys.size(); - const float value_delta = (*it).keys.back().value - (*it).keys.front().value; // NOTE: We won't handle reset, linear and constant here. @@ -176,8 +179,7 @@ void AnimResolver::UpdateAnimRangeSetup() { case LWO::PrePostBehaviour_Oscillate: { const double start_time = delta - std::fmod(my_first - first, delta); std::vector::iterator n = std::find_if((*it).keys.begin(), (*it).keys.end(), - [start_time](double t) { return start_time > t; }), - m; + [start_time](double t) { return start_time > t; }), m; size_t ofs = 0; if (n != (*it).keys.end()) { From fa7d3aa0c092fcdccc5816ff395f3903d692ebfb Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 5 Jan 2023 11:32:01 +0100 Subject: [PATCH 05/11] Update the getting help section --- Readme.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 0a04da999..30133aa84 100644 --- a/Readme.md +++ b/Readme.md @@ -76,10 +76,15 @@ The source code is organized in the following way: code/AssetLib/ Implementation for import and export for the format ### Where to get help ### -For more information, visit [our website](http://assimp.org/). Or check out the `./doc`- folder, which contains the official documentation in HTML format. -(CHMs for Windows are included in some release packages and should be located right here in the root folder). +To find our documentation, visit [our website](https://assimp.org/) or check out [Wiki](https://github.com/assimp/assimp/wiki) -If the docs don't solve your problem, ask on [StackOverflow with the assimp-tag](http://stackoverflow.com/questions/tagged/assimp?sort=newest). If you think you found a bug, please open an issue on Github. +If the docs don't solve your problem, you can check +- Ask on [StackOverflow with the assimp-tag](http://stackoverflow.com/questions/tagged/assimp?sort=newest). +- Ask on [Assimp-Community on Reddit](https://www.reddit.com/r/Assimp/) +- File a question at [The Assimp-Issue Tracker](https://github.com/assimp/assimp/issues) +- Ask a question at [The Assimp-Discussion Board](https://github.com/assimp/assimp/discussions) + +If you think you found a bug, please open an issue on Github. Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export. From f6457e1c8736b2f066bfef9d05dbb676111874eb Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 5 Jan 2023 11:34:12 +0100 Subject: [PATCH 06/11] Update Readme.md --- Readme.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Readme.md b/Readme.md index 30133aa84..917b8e8aa 100644 --- a/Readme.md +++ b/Readme.md @@ -78,13 +78,11 @@ The source code is organized in the following way: ### Where to get help ### To find our documentation, visit [our website](https://assimp.org/) or check out [Wiki](https://github.com/assimp/assimp/wiki) -If the docs don't solve your problem, you can check +If the docs don't solve your problem, you can: - Ask on [StackOverflow with the assimp-tag](http://stackoverflow.com/questions/tagged/assimp?sort=newest). - Ask on [Assimp-Community on Reddit](https://www.reddit.com/r/Assimp/) -- File a question at [The Assimp-Issue Tracker](https://github.com/assimp/assimp/issues) - Ask a question at [The Assimp-Discussion Board](https://github.com/assimp/assimp/discussions) - -If you think you found a bug, please open an issue on Github. +- Nothing has worked? File a question or an issue-report at [The Assimp-Issue Tracker](https://github.com/assimp/assimp/issues) Open Asset Import Library is a library to load various 3d file formats into a shared, in-memory format. It supports more than __40 file formats__ for import and a growing selection of file formats for export. From 74af523b3ef6a68fa07749ac974d4fd51c6324e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20R=C3=B6sner?= Date: Thu, 12 Jan 2023 13:13:46 +0100 Subject: [PATCH 07/11] Generalize JoinVerticesProcess for multiple UV and color channels --- code/PostProcessing/JoinVerticesProcess.cpp | 49 +++++++++++++-------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/code/PostProcessing/JoinVerticesProcess.cpp b/code/PostProcessing/JoinVerticesProcess.cpp index ef5999875..f752ed0eb 100644 --- a/code/PostProcessing/JoinVerticesProcess.cpp +++ b/code/PostProcessing/JoinVerticesProcess.cpp @@ -105,7 +105,11 @@ void JoinVerticesProcess::Execute( aiScene* pScene) { namespace { -bool areVerticesEqual(const Vertex &lhs, const Vertex &rhs, bool complex) { +bool areVerticesEqual( + const Vertex &lhs, + const Vertex &rhs, + unsigned numUVChannels, + unsigned numColorChannels) { // A little helper to find locally close vertices faster. // Try to reuse the lookup table from the last step. const static float epsilon = 1e-5f; @@ -124,10 +128,6 @@ bool areVerticesEqual(const Vertex &lhs, const Vertex &rhs, bool complex) { return false; } - if ((lhs.texcoords[0] - rhs.texcoords[0]).SquareLength() > squareEpsilon) { - return false; - } - if ((lhs.tangent - rhs.tangent).SquareLength() > squareEpsilon) { return false; } @@ -136,19 +136,18 @@ bool areVerticesEqual(const Vertex &lhs, const Vertex &rhs, bool complex) { return false; } - // Usually we won't have vertex colors or multiple UVs, so we can skip from here - // Actually this increases runtime performance slightly, at least if branch - // prediction is on our side. - if (complex) { - for (int i = 0; i < 8; i++) { - if (i > 0 && (lhs.texcoords[i] - rhs.texcoords[i]).SquareLength() > squareEpsilon) { - return false; - } - if (GetColorDifference(lhs.colors[i], rhs.colors[i]) > squareEpsilon) { - return false; - } + for (unsigned i = 0; i < numUVChannels; i++) { + if ((lhs.texcoords[i] - rhs.texcoords[i]).SquareLength() > squareEpsilon) { + return false; } } + + for (unsigned i = 0; i < numColorChannels; i++) { + if (GetColorDifference(lhs.colors[i], rhs.colors[i]) > squareEpsilon) { + return false; + } + } + return true; } @@ -241,9 +240,16 @@ struct std::hash { //template specialization for std::equal_to for Vertex template<> struct std::equal_to { + equal_to(unsigned numUVChannels, unsigned numColorChannels) : + mNumUVChannels(numUVChannels), + mNumColorChannels(numColorChannels) {} bool operator()(const Vertex &lhs, const Vertex &rhs) const { - return areVerticesEqual(lhs, rhs, false); + return areVerticesEqual(lhs, rhs, mNumUVChannels, mNumColorChannels); } + +private: + unsigned mNumUVChannels; + unsigned mNumColorChannels; }; // now start the JoinVerticesProcess int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) { @@ -316,8 +322,13 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) { uniqueAnimatedVertices[animMeshIndex].reserve(pMesh->mNumVertices); } } - // a map that maps a vertix to its new index - std::unordered_map vertex2Index; + // a map that maps a vertex to its new index + const auto numBuckets = pMesh->mNumVertices; + const auto hasher = std::hash(); + const auto comparator = std::equal_to( + pMesh->GetNumUVChannels(), + pMesh->GetNumColorChannels()); + std::unordered_map vertex2Index(numBuckets, hasher, comparator); // we can not end up with more vertices than we started with vertex2Index.reserve(pMesh->mNumVertices); // Now check each vertex if it brings something new to the table From b2672c082d652b8af19b886c9419a01b6af0fc22 Mon Sep 17 00:00:00 2001 From: Steve M Date: Thu, 12 Jan 2023 12:01:22 -0800 Subject: [PATCH 08/11] Change mMethod type to enum aiMorphingMethod Address sanitizer warning --- include/assimp/mesh.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 49d43f9f9..363627464 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -566,6 +566,9 @@ struct aiAnimMesh { /** @brief Enumerates the methods of mesh morphing supported by Assimp. */ enum aiMorphingMethod { + /** Morphing method to be determined */ + aiMorphingMethod_UNKNOWN = 0x0, + /** Interpolation between morph targets */ aiMorphingMethod_VERTEX_BLEND = 0x1, @@ -747,7 +750,7 @@ struct aiMesh { * Method of morphing when anim-meshes are specified. * @see aiMorphingMethod to learn more about the provided morphing targets. */ - unsigned int mMethod; + enum aiMorphingMethod mMethod; /** * The bounding box. @@ -778,7 +781,7 @@ struct aiMesh { mMaterialIndex(0), mNumAnimMeshes(0), mAnimMeshes(nullptr), - mMethod(0), + mMethod(aiMorphingMethod_UNKNOWN), mAABB(), mTextureCoordsNames(nullptr) { for (unsigned int a = 0; a < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++a) { @@ -1002,7 +1005,7 @@ struct aiSkeletonBone { #endif // __cplusplus }; /** - * @brief + * @brief */ struct aiSkeleton { /** From 2d37f49f51e022d3862f9e3e55d9353fa229a80e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 15 Jan 2023 19:12:24 +0100 Subject: [PATCH 09/11] Remove deprecated comment - closes https://github.com/assimp/assimp/issues/4869 --- code/AssetLib/FBX/FBXTokenizer.h | 1 - 1 file changed, 1 deletion(-) diff --git a/code/AssetLib/FBX/FBXTokenizer.h b/code/AssetLib/FBX/FBXTokenizer.h index 5ed48e61d..79f71229b 100644 --- a/code/AssetLib/FBX/FBXTokenizer.h +++ b/code/AssetLib/FBX/FBXTokenizer.h @@ -154,7 +154,6 @@ private: const unsigned int column; }; -// XXX should use C++11's unique_ptr - but assimp's need to keep working with 03 typedef const Token* TokenPtr; typedef std::vector< TokenPtr > TokenList; From 43c0f8bb3d41250d6b566e6cb5b9a5c79e36aae3 Mon Sep 17 00:00:00 2001 From: Martin Mory Date: Sun, 15 Jan 2023 23:03:41 +0100 Subject: [PATCH 10/11] Remove whitespace between a tag and the first number, otherwise first call to strtoul10() returns 0 and the indices are broken, leading to possible out-of-bound access and memory corruption/crash --- code/AssetLib/Collada/ColladaParser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/code/AssetLib/Collada/ColladaParser.cpp b/code/AssetLib/Collada/ColladaParser.cpp index 91f32f485..cce6a0db6 100644 --- a/code/AssetLib/Collada/ColladaParser.cpp +++ b/code/AssetLib/Collada/ColladaParser.cpp @@ -762,6 +762,7 @@ void ColladaParser::ReadControllerWeights(XmlNode &node, Collada::Controller &pC if (text == nullptr) { throw DeadlyImportError("Out of data while reading "); } + SkipSpacesAndLineEnd(&text); it->first = strtoul10(text, &text); SkipSpacesAndLineEnd(&text); if (*text == 0) { From 5cbc00a595db2166463bc494435a67b4080d28fc Mon Sep 17 00:00:00 2001 From: Krishty Date: Mon, 16 Jan 2023 08:29:49 +0100 Subject: [PATCH 11/11] Fix Build With M3D Import Only `M3DWrapper.h` is designed to omit the definition of `class M3DWrapper` if neither M3D import nor M3D export are compiled. 608bccd9cf3a28c55163c10e84aec025293b7ab0 touched the corresponding preprocessor checks and introduced a bug: ``` #ifndef ASSIMP_BUILD_NO_M3D_IMPORTER #if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER) class M3DWrapper { ``` When compiling - with M3D import enabled, - but with either export generally disabled or M3D export disabled specifically, These checks evaluate to the wrong result and skip the definition, leading to a build failure in dependent code. ``` #if 1 // import enabled #if !(1 || 1) // export disabled and M3D export disabled ``` This commit fixes the check to compile the definition if neither import is disabled. --- code/AssetLib/M3D/M3DWrapper.cpp | 4 +--- code/AssetLib/M3D/M3DWrapper.h | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/code/AssetLib/M3D/M3DWrapper.cpp b/code/AssetLib/M3D/M3DWrapper.cpp index 30452c776..05087d592 100644 --- a/code/AssetLib/M3D/M3DWrapper.cpp +++ b/code/AssetLib/M3D/M3DWrapper.cpp @@ -39,8 +39,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------------- */ -#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER -#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER) +#if !defined ASSIMP_BUILD_NO_M3D_IMPORTER || !(defined ASSIMP_BUILD_NO_EXPORT || defined ASSIMP_BUILD_NO_M3D_EXPORTER) #include "M3DWrapper.h" @@ -149,4 +148,3 @@ void M3DWrapper::ClearSave() { } // namespace Assimp #endif -#endif diff --git a/code/AssetLib/M3D/M3DWrapper.h b/code/AssetLib/M3D/M3DWrapper.h index c75ff1027..880aca996 100644 --- a/code/AssetLib/M3D/M3DWrapper.h +++ b/code/AssetLib/M3D/M3DWrapper.h @@ -47,8 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef AI_M3DWRAPPER_H_INC #define AI_M3DWRAPPER_H_INC -#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER -#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER) +#if !defined ASSIMP_BUILD_NO_M3D_IMPORTER || !(defined ASSIMP_BUILD_NO_EXPORT || defined ASSIMP_BUILD_NO_M3D_EXPORTER) #include #include @@ -126,7 +125,6 @@ inline m3d_t *M3DWrapper::M3D() const { } // namespace Assimp -#endif #endif // ASSIMP_BUILD_NO_M3D_IMPORTER #endif // AI_M3DWRAPPER_H_INC