From df8a9bb2b83161d6ac68c1df2e511c4c89d1fa40 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 3 Jan 2023 21:11:09 +0100 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 4/4] 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.