Commit Graph

451 Commits

Author SHA1 Message Date
Luca Della Vedova
672594c230 Revert "Refactoring: use using types (#6266)" (#6324)
* Revert "Refactoring: use using types (#6266)"
2025-11-04 15:10:45 +01:00
Kim Kulling
f544f9c217 Bugfix/fix sonarcube findings (#6369)
* Fix sonarcube findings.
---------
Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-10-14 00:01:50 +02:00
Kim Kulling
9f4e7c6d8d Refactoring: use using types (#6266)
* Refactoring: use using types

---------

Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-07-28 17:00:45 +02:00
Kim Kulling
fb375dd8c0 Prepare 6.0.2 (#6231) 2025-06-08 21:50:39 +02:00
crasong
315075c4a6 Add Missing Strings to aiTextureTypeToString (#6188)
Anisotropy and gltf metallic roughness were missing strings

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-22 23:25:34 +02:00
Kim Kulling
9d9a80739d Fix: Fix leak when sortbyp failes with exception (#6166)
Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-05-14 11:43:12 +02:00
Matthias Möller
9182879e1f fix: possible Heap-based Buffer Overflow in ConvertToUTF8 function (#6122)
* fix: possible Heap-based Buffer Overflow in ConvertToUTF8 function

* Update BaseImporter.cpp

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-03 10:40:59 +02:00
krishty
88959b2be7 Fix Whitespace (#6063)
* Fix Whitespace

No functional changes. This commit removes trailing spaces, undesired line breaks, and formatting screwups.

* Remove more useless line breaks in license (500 out of 630 license copies do NOT use double line breaks here)

---------

Co-authored-by: Krishty <krishty@krishty.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-03-26 00:12:55 +01:00
Kim Kulling
4b8f55cc00 Bugfix: Fix possible nullptr dereferencing (#6049)
* Bugfix: Fix possible nullptr dereferencing
2025-03-13 11:04:25 +01:00
T.Yamada
f398a70163 Use std::copy to copy array and remove user destructor to make sure is_trivially_copyable in order to avoid -Wno-error=nontrivial-memcall (#6029)
Use std::copy to copy array and remove user destructor to make sure is_trivially_copyable in order to avoid -Wno-error=nontrivial-memcall (#6029)
2025-03-11 15:09:10 +01:00
Kim Kulling
45898eee55 Refactorings: glTF cleanups (#6028) 2025-03-05 21:37:47 +01:00
Kim Kulling
f52fcb6052 Obj: remove smooth-normals postprocessing (#6031)
- closes https://github.com/assimp/assimp/issues/5514
2025-03-03 09:44:35 +01:00
Kim Kulling
5d716b8fe0 Bugfix/fix mingw issue 5975 (#6005)
* MDL: Ensure alignment of bool vector
2025-02-20 21:20:11 +01:00
Engin Manap
2f6dcdfd72 Assimp master head fixes for failure to compile (#5899)
* Fix unknown pragma error on msys2 mingw

* Fix missing assignment operator on msys2 mingw

Default is omitted by compiler because custom copy constructor

* Fix redefinition of _1 and _2 error on msys2 mingw

fix is converting it to lambda as clang is claiming that is
preferred

* Fix strncpy warnings about truncation

* Fix missing assignment operator error on clang

* Update glTFImporter.cpp

* Update glTF2Importer.cpp

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-01-14 14:23:02 +01:00
Jackson Levitt
2f40a77ae1 Updated Material.cpp to add missing cases (#5945) 2025-01-06 13:02:55 +01:00
tyler92
f12e521986 Fix use after free in the CallbackToLogRedirector (#5918)
The heap-use-after-free vulnerability occurs in the
CallbackToLogRedirector function. During the process of logging,
a previously freed memory region is accessed, leading to a
use-after-free condition. This vulnerability stems from incorrect
memory management, specifically, freeing a log stream and then
attempting to access it later on.

This patch sets NULL value for The DefaultStream global pointer.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-11 11:17:14 +01:00
Kim Kulling
28ebc8452b Fix: Fix build for mingw10 (#5916)
- closes https://github.com/assimp/assimp/issues/5827
2024-12-10 23:40:02 +01:00
Stefan
739ebfd207 Synchronize DefaultLogger (#5898)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-01 20:35:24 +01:00
Kim Kulling
41cc2f66a4 Remove strcpy. (#5802)
* Remove strcpy.

* Sonarcube: Add more strcpy replacements

* BlenderLoader: Replace strncpy by memcpy
2024-11-18 16:54:58 +01:00
Marco Feuerstein
6520354a58 Fix use of uninitialized value. (#5867)
If the stat command fails, statbuf is uninitialized.
2024-11-06 10:54:14 +01:00
Michael Schmitt
e699d23559 Store current exception when caught in ASSIMP_CATCH_GLOBAL_EXCEPTIONS (#5810)
In all other instances where we set mErrorString inside a catch block
we also set mException. I think that this was an oversight.

Co-authored-by: Michael Schmitt <michael.schmitt@visometry.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-10-29 10:59:37 +01:00
chefrolle695
4b9ac76815 Fixed bug in DefaultLogger::set: (#5826)
assigning s_pNullLogger to the parameter "logger" is definitely wrong.
However, custom logger previously set from user must not be deleted.
The user itself must handle allocation / deallocation.
2024-10-17 21:14:14 +02:00
Pichas
f4c7606faf fix no_valid_proc (#5774)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-09-16 09:17:22 +02:00
Kim Kulling
4024726eca Fix leak (#5762)
* Fix leak

* Update utLogger.cpp
2024-09-07 21:02:34 +02:00
Matthias Möller
3e7e4c8c52 Fix potential memory leak in SceneCombiner for LWS/IRR/MD3 loader (#5721)
* fix potential memory leak in scenecombiner

* also cleansup srclist

* de-duplicates before deleting

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-08-29 11:21:59 +02:00
Vincent Fazio
4338817ca2 Fix copying private data when source pointer is NULL (#5733) 2024-08-29 00:13:40 +02:00
sacereda
d83904e3ee Expose aiGetEmbeddedTexture to C-API (#5382)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-08-21 21:15:57 +02:00
Kim Kulling
a37d748c17 Update DefaultIOSystem.cpp (#5697)
- closes https://github.com/assimp/assimp/issues/5678
2024-08-02 18:28:29 +02:00
Kim Kulling
da281b7f48 Introduce interpolation mode to vectro and quaternion keys 2024-07-17 15:49:17 +02:00
Kim Kulling
35e4f1bf64 Kimkulling/fix double precision tests (#5660)
* Make color single precision

* Fix the unittests for double precision

* Fix merge issues

* Fix issues with Vertex + Color4

* Fix vertex operator, some tests are still red.
2024-07-12 14:37:49 +02:00
Steve M
0cb1693689 [USD] Integrate "tinyusdz" project (#5628)
* Squash development commits for PR

* Fix failing build on armeabi-v7a via android NDK

* Update with blendshape support

* Migrate to auto-cloning and patching tinyusdz (instead of manually copying files)

* Update to latest rendermesh-refactor branch commit

* Remove tracked file

* Update to use recent commit to "dev" branch

"rendermesh-refactor" was merged to "dev" around 9 May 2024 but merge
was not obvious from commit messages

* Add UNUSED() macro

(cherry picked from commit d89fe8f034c353cc5cc5b3ac78cd8845e006de38)

* Update tinyusdz branch

* Prevent per-ABI (x86, x86_64 etc) clone on android

* Add verbose logging cmake option

* Fix macro and patch

* Address compiler warnings

* Address compiler warnings

* Address compiler warnings

* Attempt prevent re-clone/re-patch once downloaded by any ABI build

* Disable tinyusdz clone/build by default

assimp github PR auto-CI checks clone/build the tinyusdz code, and reject PR
due to compiler warnings in the 3rd party external tinyusdz project

---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
2024-07-12 13:25:35 +02:00
Brad D
625528d02c Fix: StackAllocator Undefined Reference fix (#5650)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-07-03 10:05:58 +02:00
Kim Kulling
a51500ba2b Draft: Update init of aiString (#5623)
* Draft: Update init of aiString

- closes https://github.com/assimp/assimp/issues/5622

* Update types.h

* Fix typo

* Fix another typo

* Adapt usage of AI_MAXLEN

* Fix compare operator

* Add missing renames
2024-06-17 13:12:54 +02:00
Kim Kulling
97cbecb859 Move revision.h and revision.h.in to include folder (#5615) 2024-06-12 21:01:03 +02:00
Kim Kulling
a722e33027 Move aiScene constructor (#5614) 2024-06-11 21:19:52 +02:00
Kim Kulling
30466aaf16 Fix possible nullptr dereferencing. (#5595) 2024-05-24 15:36:30 +02:00
vengine
ec5242a1a0 Fix a bug that could cause assertion failure. (#5575)
Co-authored-by: macmini <xhnsworks2@icloud.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-05-22 21:20:22 +02:00
Kim Kulling
325b0a543f Add checks for invalid buffer ans size (#5570) 2024-05-13 08:55:10 +02:00
Kim Kulling
8b9ed34eaa Update CMakeLists.txt (#5531)
* Update CMakeLists.txt

* Update Version.cpp

* Update CMakeLists.txt

Update minimum version of cmake

* Update utVersion.cpp

Adapt unittest
2024-04-07 23:14:12 +02:00
Kim Kulling
b41ffa5561 Remove default destructor definitions from cpp files (#5528) 2024-04-07 21:42:52 +02:00
Laura Hermanns
727774f181 Fix compilation for MSVC14. (#5490)
- std::min/max were not defined in StackAllocator.inl; Also added explicit template arguments to break macro expansion if Windows.h is included prior and NOMINMAX macro is not present.
- Made static_assert statements compatible with C++11 in ProcessHelper.cpp.
- Removed unused string_view include in ObjFileParser.cpp.
2024-03-11 09:09:23 +01:00
Kim Kulling
01231d0e60 Add 2024 to copyright infos (#5475) 2024-02-23 22:30:05 +01:00
tigertang
a02085ea98 Update StbCommon.h to stay up-to-date with stb_image.h.
This enables C++ API users to statically link Assimp into their projects along with stb_image.
2024-01-29 13:52:54 +01:00
Marka Ragnos
3ce8a58d41 Update DefaultIOSystem.cpp
Added missing whitespace
2023-12-20 20:55:04 +01:00
Alexander Wagner
d03ab3ef27 - fixed Exist function on Linux 2023-12-20 20:55:04 +01:00
IOhannes m zmölnig
bfdd154d14 Always include "zlib.h" (rather than .../contrib/zlib/zlib.h)
The path to the vendored zlib is set by the build-system,
so there's no need to add additional preprocessor magic
2023-11-29 09:53:03 +01:00
IOhannes m zmölnig
6f70e220e4 always include "utf8.h" (instead of contrib/.../utf8.h) 2023-11-29 09:53:03 +01:00
Kim Kulling
0b0ec713f6 Fix empty mesh handling 2023-11-10 15:36:40 +01:00
Kim Kulling
e5e3e07b84 Fix copyrights. 2023-09-23 18:35:48 +02:00
Aaron
0bfc588c39 Update Triangulate Process [more another case] 2023-08-15 18:01:16 +08:00