12850 Commits

Author SHA1 Message Date
Kim Kulling
c1d6226c06 Update/update pugi xml (#6229)
* update pugixml

Improvements:

Many xml_attribute:: and xml_node:: functions now transparently support std::string_view and std::string when C++17 support is detected.
CMake improvements:

Improve pkg-config file generation for NixOS
PUGIXML_BUILD_APPLE_FRAMEWORK CMake option can be used to build pugixml as .xcframework
PUGIXML_INSTALL CMake option can be used to disable installation targets
Compatibility improvements:

Fix clang/gcc warnings -Wzero-as-null-pointer-constant, -Wuseless-cast, -Wshorten-64-to-32
Fix unreferenced function warnings in PUGIXML_NO_STL configuration
Fix CMake 3.31 deprecation warnings
Stop using deprecated throw() when noexcept is available

Improvements:

xml_attribute::set_name and xml_node::set_name now have overloads that accept pointer to non-null-terminated string and size
Implement parse_merge_pcdata parsing mode in which PCDATA contents is merged into a single node when original document had comments that were skipped during parsing
xml_document::load_file now returns a more consistent error status when given a path to a folder
Bug fixes:

Fix assertion in XPath number→string conversion when using non-English locales
Fix PUGIXML_STATIC_CRT CMake option to correctly select static CRT when using MSVC and recent CMake
Compatibility improvements:

Fix GCC 2.95/3.3 builds
Fix CMake 3.27 deprecation warnings
Fix XCode 14 sprintf deprecation warning when compiling in C++03 mode
Fix clang/gcc warnings -Wweak-vtables, -Wreserved-macro-identifier

* Update CMakeLists.txt

* pugixml: upgrade to v1.15

* pugixml: Add export directives for non-windows platforms

* pugixml: replace NULL by nullptr.

---------

Co-authored-by: Andrea <realeandrea@yahoo.it>
Co-authored-by: mosfet80 <10235105+mosfet80@users.noreply.github.com>
2025-06-08 02:12:05 +02:00
Jackson Levitt
8621d52430 Updated Inner Cone formula for Spot Lights in GLTF (#6078)
Updated the Inner Cone formula such that exponent values of 0 result in no inner cone and large exponent values result in a inner cone being most of the cone angle-wise.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-06-05 09:41:30 +02:00
sSsA01
5d39661751 fix compile error caused by PR #6087 when ASSIMP_DOUBLE_PRESICION is enabled (#6091)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-06-05 09:15:47 +02:00
sSsA01
a98ffe6c6f Fix export fbx: Wrong Materials in LayerElementMaterial if a node contains multi meshes (#6103)
* fix export fbx wrong Materials index in LayerElementMaterial

* Refix export fbx wrong Materials index in LayerElementMaterial. Materials index should be the order of Materials in connections of the Model node.

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-06-05 09:05:36 +02:00
Kim Kulling
b3a47a68fa Version: Adapt version (#6212)
* Version: Adapt version

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

* Update utVersion.cpp
v6.0.1
2025-06-02 10:54:32 +02:00
NSG
c4515f53ca Fix: Add "preservePivots" condition when importing FBX animation (#6115)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
v6.0.0
2025-05-31 14:41:25 +02:00
Vinz Spring
7eb6b0c3db fix: closes #6069 CVE-2025-3196 (#6154)
* fix: closes #6069 CVE-2025-3196

* fix: updated patch for upstream symbol names

* fix: warning C4267

---------

Co-authored-by: Vinz Jarl Valentin Spring <vinzs@amazon.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
Co-authored-by: Vinz Spring <contact@vinzspring.de>
2025-05-31 14:27:10 +02:00
sSsA01
7b38feb8a7 Fix export fbx PolygonVertexIndex (#6102)
* fix export fbx vertex index

* refactoring: remove unnecessary casts

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-31 13:49:58 +02:00
yurik
b97308683b Fix a bug in importing binary PLY file (#1) (#6060)
* Correct IOStreamBuffer<T>::getNextLine() to prevent skipping too many '\n', which could be part of the BINARY part
* Add a regression test
2025-05-31 09:05:44 +02:00
deccer
4ad1d2aa30 Fix HUNTER_ERROR_PAGE (#6200)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-27 13:09:35 +02:00
Steve M
4535ff9d6e Annotate w/C++17 "fallthrough" (#6143)
Co-authored-by: tellypresence <info@tellypresence.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-27 11:14:29 +02:00
Martin Mirchev
18465fbb24 Add clamping logic (#6149)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-26 10:16:10 +02:00
Peter Lemanski
d2aed87f5e Fix issue compiling when assimp added as subdirectory and parent project defines /utf-8 compile flag (#6186)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-23 12:54:03 +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
Jan Honsbrok
4f3a759a05 fix: missing OS separator in outfile (#6098)
The outfile was missing an OS separator when a PBRT file was exported in a path that was not the current directory.
Writing to /foo/bar.pbrt was writing to foobar.pbrt instead.
mPath and mFile are now handled like it's described in PbrtExporter.h

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-20 15:33:13 +02:00
mosfet80
3e8673b14d update draco lib (#6094)
Version 1.5.7 release:
Using the versioned www.gstatic.com WASM and Javascript decoders continues
to be recommended. To use v1.5.7, use this URL:
https://www.gstatic.com/draco/versioned/decoders/1.5.7/*
Added support for normalized attributes to Emscripten encoder API.
Bug fixes.
Security fixes.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-18 20:51:46 +02:00
Kim Kulling
1933313ec8 Unreal refactorings (#6182)
* Unreal refactorings

---------

Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-05-16 14:18:37 +02:00
Kim Kulling
696771d576 Doc: add C++ / c minimum (#6187)
- closes https://github.com/assimp/assimp/issues/3370
2025-05-16 11:34:54 +02:00
Julian Knodt
2c77d2555b [#5983] Fix bugs introduced in fbx export (#6000)
There were some typos and incorrect offsets in a previous PR. This fixes part of it, correctly exporting the UV.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-16 10:22:01 +02:00
Martin Mirchev
ed89a02fff Fix out-of-bounds dereferencing (#6150)
* Fix out-of-bounds dereferencing

* Fix: Add log error entry.

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-16 09:07:04 +02:00
Xavier Bonaventura
b40e41f9c3 Update contrib/zip to fix data loss warning (#6152)
Without these changes, the warning "Type conversion may result in loss of data" might be triggered because `i` is of type `ssize_t` but the type of the parameter is `mz_uint` that is an alias for `unsinged int`.
This was already fixed in the original repository
see
d7a2252a53/src/zip.c (L481C49-L481C58)
and
d7a2252a53/src/zip.c (L538)

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-15 08:50:44 +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
Xavier Bonaventura
64073458bd Fix warning abut inexistent warning (#6153)
These warnings are not existing before Visual Studio 2015

Fixes #6151

Co-authored-by: Xavier Bonaventura <xavier.bonaventura@gmail.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-13 20:37:42 +02:00
mnml_
b9bfac0418 add missing constants (#6116)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-11 21:11:54 +02:00
copycd
536cd59807 + Only up to recognizing the KTX2 compressed image as a texture object is handled. (#6139) 2025-05-08 21:28:30 +02:00
Kim Kulling
327afe0183 Fix crashes (#6138) 2025-05-07 23:40:53 +02:00
Kim Kulling
2056679e98 Fix: Support uint16 indices in OpenGEX as well (#6137)
Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-05-07 10:15:54 +02:00
Qingyou Zhao
af352d6f7c Fix a bug where string erases throws out of range (#6135)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-06 23:33:28 +02:00
Qingyou Zhao
0dafa03ff8 Fix a out of bound buffer access in ParsingUtils GetNextLine (#6134) 2025-05-06 07:48:09 +02:00
Kim Kulling
d1b73dffec Replace exception by error in log (#6133)
* Replace exception by error in log

* Separate tests for new behaviour

---------

Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-05-05 14:07:52 +02:00
kiro
b0e0ce5a28 support for cmake findpackage module mode (#6121)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-05-04 13:17:56 +02:00
Kim Kulling
0c02313893 Refactor (#6127)
* Refactor 3DS

---------

Co-authored-by: Kim Kulling <kim.kulling@draeger.com>
2025-05-03 11:46:10 +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
Kim Kulling
275eca9535 Bugfix: Handling no of texture coordinates correctly (#6124)
- If the mesh supports more than 2 texture coordinates this was not handled correctly. Now the code will be able to deal with 2 or 3 coords and throws an exception if this value gets invalid.
- closes https://github.com/assimp/assimp/issues/3829
2025-04-29 20:03:58 +02:00
yuri@FreeBSD
cb56793e16 fix: Fix build on armv6/armv7 (#6123) 2025-04-27 21:27:45 +02:00
sSsA01
ac5988422a Refactoring of PR #6092 (#6101)
* Fix fbx export. Nodes "LayerElementNormal" and "LayerElementColor" should be written only when actual data are exported.

* Update FBXExporter.cpp

- Fix intentions
- use empty instead of size for checking data exists

* refactoring

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-04-16 09:52:13 +02:00
Kim Kulling
4ee7b9d98d Use unique pointer to fix possible leak (#6104) 2025-04-15 21:51:05 +02:00
sSsA01
e68ea14f56 Not to export empty "LayerElementNormal" or "LayerElementColor" nodes to fbx (#6092)
* Fix fbx export. Nodes "LayerElementNormal" and "LayerElementColor" should be written only when actual data are exported.
2025-04-14 15:20:31 +02:00
Kim Kulling
2f3e72413f Bugfix/ensure collada parsing works issue 1488 (#6087)
* Add text to ensure that float parsing in colladata works right
2025-04-10 15:30:12 +02:00
Kim Kulling
0ae66d2703 Fix set (#6073)
* Fix set

* Fix: Fix implicite cast from size_t to uint32_t
2025-04-08 13:14:10 +02:00
Alexelnet
e27204c27a Renamed and inlined hasSkeletons() to HasSkeletons() to match the other Has*() methods. (#6072) 2025-04-01 15:07:04 +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
krishty
b57f7d367c Harmonize Importer #includes (#6065)
* Harmonize Importer #includes

Some importers referred to their headers via `#include "AssetLib/[format]/[header.h"`, others via `#include "[header].h"`, others mixed both (e.g. IRR). This is a matter of taste, but it should at least be done the same way everywhere.

Most importers seem to prefer `#include "[header].h"`, so this commit enforces it.

Cross-referencing files from other importers is still done through `AssetLib/[format]`.

Assimp headers are not affected and I would advise against changing them, as this could lead to subtle collisions with user includes.

* went one too far

---------

Co-authored-by: Krishty <krishty@krishty.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-03-27 11:13:44 +01: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
leliel
79cba055b9 feat: created the aiGetStringC_Str() function. (#6059)
* feat: created the aiGetStringC_Str() function.

The C++ Interface's function C_Str() from the aiString struct was missing an equivalent function for the C Interface.

* changed the first parameter of the aiGetStringC_Str function to be const.

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-03-25 22:03:52 +01:00
krishty
ac0b19a771 Remove Redundant virtual (#6064)
The `override` keyword only applies to virtual functions. Specifying `virtual` again is useless.

Co-authored-by: Krishty <krishty@krishty.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-03-25 21:00:43 +01:00
krishty
cbf279d522 Fix Cinema4D Import (#6062)
#5623 broke the Cinema4D import by forgetting to rename a constant. This commit fixes the invalid name.

Co-authored-by: Krishty <krishty@krishty.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-03-24 21:32:10 +01:00
Zhang Yuntong
d307c9f1d7 NDO: Fix possible overflow access (#6055)
* NDO: Fix possible overflow access
- closes https://issues.oss-fuzz.com/issues/372765427

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2025-03-24 21:21:32 +01:00
Kim Kulling
e2ee7d2c71 [draft] Check the hunter build (#6061)
- closes https://github.com/assimp/assimp/issues/5373
2025-03-21 20:08:43 +01:00
Steve M
5a1cc9ec60 Update tinyusdz git hash (fix USD animation) (#6034)
* Update tinyusdz

* Improve reference screenshots

* Add .csm reference screenshot

* Bump version

---------

Co-authored-by: tellypresence <praktique-tellypresence@yahoo.com>
2025-03-17 20:47:28 +01:00