From 5a3401b69f0c3e7ba27aa96481e32b2618b7827e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 2 Nov 2021 10:38:38 +0100 Subject: [PATCH 1/6] Update D3MFOpcPackage.cpp - Log an error in case of a nullptr-exception in reading out the 3MF-Archive - closes https://github.com/assimp/assimp/issues/4153 --- code/AssetLib/3MF/D3MFOpcPackage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/3MF/D3MFOpcPackage.cpp b/code/AssetLib/3MF/D3MFOpcPackage.cpp index ac5b91e67..8d51a7417 100644 --- a/code/AssetLib/3MF/D3MFOpcPackage.cpp +++ b/code/AssetLib/3MF/D3MFOpcPackage.cpp @@ -149,7 +149,7 @@ D3MFOpcPackage::D3MFOpcPackage(IOSystem *pIOHandler, const std::string &rFile) : IOStream *fileStream = mZipArchive->Open(file.c_str()); if (nullptr == fileStream) { - ai_assert(fileStream != nullptr); + ASSIMP_LOG_ERROR("Filestream is nullptr."); continue; } From b8a10e62f9ba1d69b52a23e9a95e5fb2baed5e0d Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Tue, 9 Nov 2021 13:08:13 -0500 Subject: [PATCH 2/6] Remove optimization fence --- code/AssetLib/STEPParser/STEPFileReader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/STEPParser/STEPFileReader.cpp b/code/AssetLib/STEPParser/STEPFileReader.cpp index 360277912..09a596aa4 100644 --- a/code/AssetLib/STEPParser/STEPFileReader.cpp +++ b/code/AssetLib/STEPParser/STEPFileReader.cpp @@ -325,7 +325,7 @@ std::shared_ptr EXPRESS::DataType::Parse(const char*& i std::transform(s.begin(),s.end(),s.begin(),&ai_tolower ); if (schema->IsKnownToken(s)) { for(cur = t+1;*cur++ != '(';); - const std::shared_ptr dt = Parse(cur); + std::shared_ptr dt = Parse(cur); inout = *cur ? cur+1 : cur; return dt; } From e206d699da026aa88dbeb43730c0818f428a03f7 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 9 Nov 2021 23:26:20 +0100 Subject: [PATCH 3/6] Change version to 5.1.0 - Change version for Version 5.1.0-RC1 to 5.1.0 - closes https://github.com/assimp/assimp/issues/4161 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f893646a..4e47b5732 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ IF(ASSIMP_HUNTER_ENABLED) add_definitions(-DASSIMP_USE_HUNTER) ENDIF() -PROJECT( Assimp VERSION 5.0.1 ) +PROJECT(Assimp VERSION 5.1.0) # All supported options ############################################### From 8a613a86555008a8310a3d0a62e51e2335cf721e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 9 Nov 2021 23:27:58 +0100 Subject: [PATCH 4/6] Fix unittest --- test/unit/utVersion.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/unit/utVersion.cpp b/test/unit/utVersion.cpp index 0de6ef39c..6577c7758 100644 --- a/test/unit/utVersion.cpp +++ b/test/unit/utVersion.cpp @@ -44,16 +44,16 @@ class utVersion : public ::testing::Test { }; TEST_F( utVersion, aiGetLegalStringTest ) { - const char *lv( aiGetLegalString() ); + const char *lv = aiGetLegalString(); EXPECT_NE( lv, nullptr ); std::string text( lv ); - size_t pos( text.find( std::string( "2021" ) ) ); + size_t pos = text.find(std::string("2021")); EXPECT_NE( pos, std::string::npos ); } TEST_F( utVersion, aiGetVersionMinorTest ) { - EXPECT_EQ( aiGetVersionMinor(), 0U ); + EXPECT_EQ( aiGetVersionMinor(), 1U ); } TEST_F( utVersion, aiGetVersionMajorTest ) { From c01d33a77a388be98ab4316979949d0294c8a619 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 10 Nov 2021 09:12:35 +0100 Subject: [PATCH 5/6] Update anim.h - Add missing whitespaces --- include/assimp/anim.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/assimp/anim.h b/include/assimp/anim.h index dcd054d1e..8a73297a5 100644 --- a/include/assimp/anim.h +++ b/include/assimp/anim.h @@ -98,6 +98,7 @@ struct aiVectorKey { bool operator<(const aiVectorKey &rhs) const { return mTime < rhs.mTime; } + bool operator>(const aiVectorKey &rhs) const { return mTime > rhs.mTime; } @@ -131,6 +132,7 @@ struct aiQuatKey { bool operator==(const aiQuatKey &rhs) const { return rhs.mValue == this->mValue; } + bool operator!=(const aiQuatKey &rhs) const { return rhs.mValue != this->mValue; } @@ -139,6 +141,7 @@ struct aiQuatKey { bool operator<(const aiQuatKey &rhs) const { return mTime < rhs.mTime; } + bool operator>(const aiQuatKey &rhs) const { return mTime > rhs.mTime; } From 5fd2a5559cda5b8d821e25d0bfeb68aba83a3007 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 10 Nov 2021 09:19:29 +0100 Subject: [PATCH 6/6] Update mesh.h - Add initialization for armature attributes. - closes https://github.com/assimp/assimp/issues/4158 --- include/assimp/mesh.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 8223b3443..225f8556a 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -300,6 +300,10 @@ struct aiBone { aiBone() AI_NO_EXCEPT : mName(), mNumWeights(0), +#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS + mArmature(nullptr), + mNode(nullptr), +#endif mWeights(nullptr), mOffsetMatrix() { // empty @@ -309,6 +313,10 @@ struct aiBone { aiBone(const aiBone &other) : mName(other.mName), mNumWeights(other.mNumWeights), +#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS + mArmature(nullptr), + mNode(nullptr), +#endif mWeights(nullptr), mOffsetMatrix(other.mOffsetMatrix) { if (other.mWeights && other.mNumWeights) {