Commit Graph

34 Commits

Author SHA1 Message Date
peng
ae6633ef8a Fix AC3DImporter heap-buffer-overflow by validating mesh vertex bounds (#6458)
Add validations check in AC3DImporter::ConvertObjectSection to ensure that writing TriangleStrip vertex data does not exceed mesh->mNumVertices allocation.
Fixes #6015 (CVE-2025-2754)
Fixes #6018 (CVE-2025-2756)

Signed-off-by: mapengyuan <mapengyuan@xfusion.com>
2026-01-28 21:33:55 +01:00
Kim Kulling
e0b52347c6 Update copyright year and project version (#6454)
* Update copyright year and project version

- Fixes version in lib

* Update copyright year to 2026

* Update copyright year to 2026 in Version.cpp

* Update copyright year and version patch test

* Fix copyright year

* Adapt copyrights
2026-01-24 21:57:37 +01:00
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
sSsA01
8355e0c4bc Fix to fail in the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled (#6250)
* Refix export fbx PolygonVertexIndex

* Fix the function ColladaParser::ReadEffectColor when the flag ASSIMP_DOUBLE_PRESICION is enabled

* Fix the static function ReadLight in ColladaParser when the flag ASSIMP_DOUBLE_PRESICION is enabled

* Refactor of the call of the function fast_atoreal_move to the member of aiColor3D

* Fix the call of the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled and and refactor

* Fix the call of the function fast_atoreal_move when the flag ASSIMP_DOUBLE_PRESICION is enabled

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-07-29 14:19:50 +02:00
DIGITAL IMAGE DESIGN
6fa9d09a97 AC: Support Double-Sided Faces (#6252)
* AC: Support Double-Sided Faces

The AC format marks double-sided SURF elements with the 0x20 flag, which Assimp ignored. This commit adds support for double-sided faces.

On encountering a double-sided face via the flag mentioned above, the front face is generated as usual but is then duplicated. The winding order of the duplicate is flipped to form a back face. Vertices are duplicated too so that back faces work correctly with normal vector generation and face smoothing.

* Add test file

* Simplify test case

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-07-29 13:09:30 +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
krishty
55e6359436 More constexpr (#6066)
Co-authored-by: Krishty <krishty@krishty.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-03-27 15:08:21 +01:00
Kim Kulling
45898eee55 Refactorings: glTF cleanups (#6028) 2025-03-05 21:37:47 +01:00
Kim Kulling
5fa7b8ceb9 Bugfix/cosmetic code cleanup (#5947)
* Refactorings: Code cleanups

* More cosmetic changes

---------

Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-01-07 23:32:50 +01: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
01231d0e60 Add 2024 to copyright infos (#5475) 2024-02-23 22:30:05 +01:00
Kim Kulling
c08e3b4abb Add bounds checks to the parsing utilities. (#5421)
* Add bounds checks to the parsing utilities.

* Fix merge conflicts in ACLoader.

* Fix loaders

* Fix unittest of AC-Loader.

* Remove dead code.

* Md5Parser fixes

* Fix md5-parsing

* Fix Merge conflict

* Fix merge conflicts.

* Md5: Fix warning: missing return statement.
2024-01-30 14:32:41 +01:00
Robert Reif
81c20a5c61 Improve acc file loading
Add warning and support for tolerating a common problem where objects have wrong kid count.
Add support for empty texture layers.
2024-01-09 21:13:13 +01:00
Kim Kulling
4535e37fc6 Fix namespaces. 2023-11-12 21:09:33 +01:00
Kim Kulling
8cf2d6e588 Refactoring: Some cleanups 2023-11-12 21:09:33 +01:00
Robert Reif
88ef9eecc1 ACLoader: add support for reading more than one texture per object 2023-02-03 20:29:56 -05:00
Aaron Gokaslan
ccfb175460 Apply various clang-tidy checks for smartprs and modern C++ types 2022-11-08 11:03:55 -05:00
Aaron Gokaslan
e93fa6699a Manually fix up 100 more instances where it should be defaulted 2022-08-25 12:20:13 -04:00
Aaron Gokaslan
27edb43600 Apply modernize-use-emplace clang-tidy rule 2022-08-23 11:41:49 -04:00
Kim Kulling
05746acb07 Merge branch 'new-file-detection' of https://github.com/krishty/assimp into krishty-new-file-detection 2022-01-16 20:41:24 +01:00
Kim Kulling
50c7301a38 Update copyrights 2022-01-10 21:13:43 +01:00
Malcolm Tyrrell
6e4b9d267b Remove TODO. Typo fix. 2021-05-17 10:29:06 +01:00
Malcolm Tyrrell
5cd3bdd5c2 No need to distinguish formatting log functions. 2021-05-13 10:25:27 +01:00
Malcolm Tyrrell
58bc4bcb63 log info 2021-05-12 12:55:21 +01:00
Krishty
0f3e6e2941 replaced std::size() with AI_COUNT_OF for pre-C++20 compilers 2021-05-05 00:08:54 +02:00
Krishty
b00de10eb3 Simplified importer search and fixed a few bugs
The search for a matching importer had a few issues, see #3791. There were two different mechanisms to determine whether an importer accepts a specific file extension:
1. `aiImporterDesc::mFileExtensions`, which was forwarded to the UI via `BaseImporter::GetExtensionList()`.
2. `BaseImporter::CanRead()` when called with `checkSig == false`, which determines whether to actually use that importer.
Both were redundant and got out of sync repeatedly. I removed 2. completely and replaced it with 1., thereby syncing UI/import and shortening all `BaseImporter::CanRead()` implementations.

Further bugfixes:
- fixed glTF2 importer throwing exceptions when checking whether it can load a file
- removed `BaseImporter::SimpleExtensionCheck()` because it is no longer used and had a bug with case sensitivity

Since the `checkSig` parameter in `BaseImporter::CanRead()` is now useless, it can be removed completely. I’m not sure if this would break ABI compatiblity, so I’ll submit it with a later pull request.
2021-04-24 00:17:50 +02:00
Kim Kulling
9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Malcolm Tyrrell
b7c789da67 Stop concatenating std::strings. Use formatter. 2020-08-18 17:35:08 +01:00
RichardTea
17b9403b7a ACLoader: Use enum for Surface flags 2020-07-17 11:23:50 +01:00
Robert Reif
628394baec check for invalid vertex 2020-07-07 23:29:54 -04:00
Robert Reif
6c29247180 add triangle strip support to AC file loader 2020-07-06 17:41:14 -04:00
Kim Kulling
6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
Malcolm Tyrrell
434c5e3d37 More verbose logging 2020-05-15 17:29:49 +01:00
Kim Kulling
f8e6512a63 Move format importer and exporter into its won folder. 2020-05-02 15:14:38 +02:00