Commit Graph

12604 Commits

Author SHA1 Message Date
Steve M
69558d8889 Introduce VRML format (.wrl and .x3dv) 3D model support (#5857)
- Introduce VRML format (.wrl and .x3dv) 3D model support
- Add samples
---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-30 11:56:18 +01:00
tyler92
5e091572d5 Fix stack overflow in LWS loader (#5941)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-30 11:15:50 +01:00
David Campos Rodríguez
ab5b32ecc7 Fix docs for aiImportFileExWithProperties. (#5925)
The docs talked about the importer, but no importer exists in the
context of calling this function. It seems like the docs may have been
accidentally copied from somewhere else.
I copied the docs from another import function within the same file.
This seems reasonable because the implementations of both functions
suggest they work the same way: the function creates the importer and
sets it into the scene private data so that the later release call can
release the importer.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-29 20:23:02 +01:00
tyler92
7bd54e3604 Disable logs for fuzzer by default (#5938)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-25 20:19:42 +01:00
Julian Knodt
258cdfd2bc Export tangents in GLTF (#5900)
Previously tangents were not being exported. If they are present, they should also be properly
exported.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-23 21:57:13 +01:00
David Campos Rodríguez
016be03c3d glTF importers: Avoid strncpy truncating away the ' \0' character (#5931)
* Fixing building errors from job https://github.com/assimp/assimp/actions/runs/12403918024/job/34628244451?pr=5928

* Adding some asserts for future mantainability, although a bit paranoic maybe

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-23 16:55:17 +01:00
Kim Kulling
1ce3164bc2 Bug/evaluate matrix4x4 access (#5936)
* Add test for 3x3 matrices and 4x4 matrix access
2024-12-23 16:33:37 +01:00
Kim Kulling
9f3a7e95ab Fix: Fix name collision (#5937)
* Fix: Fix name collision

* Fix: Fix possible override

* Fix: Use reentrant providing time function

* Fix: Fix override

* Update AssbinFileWriter.cpp

Revert, not portable.

* Update AssxmlFileWriter.cpp

Revert asctime_r, not portable.
2024-12-23 12:23:42 +01:00
tyler92
ecc8a1c869 Fix buffer overflow in MD5Parser::SkipSpacesAndLineEnd (#5921)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-17 18:57:54 +01:00
Sebastian Schäfer
2090508c34 Fix parsing of comments at the end of lines for tokens with variable number of elements. (#5890) (#5891)
* Fix parsing of comments at the end of lines for tokens with variable number of elements. (#5890)

* Fixed Quality Gate issues.

Reduced nesting of the break statements.

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-17 18:17:02 +01:00
tyler92
2b773f0f5a Fix heap-buffer-overflow in OpenDDLParser (#5919)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-16 22:48:45 +01:00
Stefan
7a114059cd Replace C# port with maintained fork (#5922) 2024-12-16 13:02:15 +01:00
sacereda
862abe410b Fixed warnings (#5903)
* Fixed conversion warning when compiling without ASSIMP_DOUBLE_PRECISION. Fixed size() <> unsigned warnings

* Fix: Review finding

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-12 20:58:08 +01:00
Gene Walters
76d22e5fbe USD updates: properly place meshes into nodes (instead of all meshes getting added to the rool node). Adding animation framerate. (#5915)
Signed-off-by: AMZN-Gene <genewalt@amazon.com>
2024-12-11 16:32:40 +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
Kursat Aktas
46c26eda5a Introducing assimp Guru on Gurubase.io (#5887)
Signed-off-by: Kursat Aktas <kursat.ce@gmail.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-05 22:54:43 +01:00
Elijah Nicol
bddc374b5a Validate mesh in WriteMesh before AttributeBegin call (#5884)
If mesh is validated after AttributeBegin call, then
the AttributeBegin is never closed with an
AttributeEnd, causing problems in pbrt.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-05 11:10:46 +01:00
HandsomeXi
164a5ae8cf bugfix: Fixed the issue that draco compressed gltf files cannot be loaded normally (#5882) (#5883)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-04 22:03:57 +01:00
Julian Knodt
ff61095928 Blendshape export float & same # verts (#5775)
Previously it was possible that the number of vertices between the mesh and morph mesh varied.
This may have caused problems in tools like Blender, and this ensures there's a 1-1
correspondence between vertices.

In addition, exporting doubles broke meshlab on import, so now it exports floats.

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-02 23:04:44 +01:00
Julian Knodt
ca17cdc1f9 Do not create GLTF Mesh if no faces (#5878)
Previously GLTF meshes were created even if there were no faces, which lead to GLTFs which were not technically valid.

I believe this fixes the problem I was encountering, but I've not been able to test it because of some Mac compile errors. Will test on a windows machine at some point.

Fixes #5868

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-12-01 21:21:08 +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
hankarun
72c51a9997 Convert float to ai_real, (#5902)
Co-authored-by: ali turan <ali.turan@simsoft.com.tr>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-29 20:54:24 +01:00
Gene Walters
2493deff37 USD Keyframe Animations (#5856)
USD Keyframe Animations

Signed-off-by: AMZN-Gene <genewalt@amazon.com>
Signed-off-by: Gene Walters <genewalt@amazon.com>
Co-authored-by: Kazuki Y <6259214+kazu0617@users.noreply.github.com>
Co-authored-by: kazu0617 <kazu0617@protonmail.com>
Co-authored-by: Kim Kulling <kim.kulling@googlemail.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-28 21:29:58 +01:00
Julian Knodt
12f3309996 Simplify JoinVerticesProcess (#5895)
Previously JoinVertices had a lot of extra complexity, simplify it greatly.

Co-authored-by: Julian Knodt <julianknodt@Julians-Air-2.attlocal.net>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-27 22:53:27 +01:00
Stefan
02d3887e9a Add CI to automatically build and attach binaries to releases (#5892)
* Add CI to automatically build and attach binaries to releases

* Correctly label arm64 MacOS and add x64 variation

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-26 22:57:44 +01:00
mosfet80
09f6a5e136 Update cpp-pm / hunter (#5885)
OpenCV and dependencies update to v4.10.0-p0

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-25 21:58:33 +01:00
Kim Kulling
5f100a0984 Obj: fix nullptr access. (#5894) 2024-11-25 19:58:58 +01:00
Kim Kulling
795d4897db Readme.md: Add sonarcube q batch (#5893)
- Add sonarcube quality badge
2024-11-25 14:48:12 +01:00
Kim Kulling
6fad13c82b Cleanup: Delete code/.editorconfig (#5889) 2024-11-22 11:38:51 +01:00
Julian Knodt
48bd7c3e22 Check that mMaterials not null before access (#5874)
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-20 23:26:07 +01:00
Matt Iselin
c867ddbc04 Fix potential uninitialized variable in clipper (#5881)
* Fix potential uninitialized variable in clipper

* Clipper: Fix second parameter as well.

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-19 23:31:47 +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
Kim Kulling
f5fb8ff842 Material: Fix sonarcube finding (#5880)
* Material: Fix sonarcube finding

- Use nullptr instead of 0x0 to simulate NULL.

* Material: Use NULL for c-code
2024-11-18 14:31:35 +01:00
Kim Kulling
c9bbbcf633 Material: Fix the build for c compiler (#5879)
- Mark inlined functions as static inline to fix the linkage for c compilers
- closes https://github.com/assimp/assimp/issues/5875
2024-11-18 09:36:32 +01:00
David Campos Rodríguez
e7a6d33365 Try to resolve image paths by replacing backslashes or forward slashes in EmbedTexturesProcess (#5844)
* Try to resolve image paths by replacing backslashes.

* Some changes suggested by CI

* Removed usage of <filesystem>.

* Removing usage of C++20/C++23 features

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-14 21:10:03 +01:00
Kim Kulling
9723b3554b Obj: Fix Sonarcube findings (#5873)
* Obj: Fix Sonarcube findings
2024-11-11 13:06:51 +01:00
Steve M
f7bb1bc170 Add reference screenshots for complex bundled test 3D model files (#5822)
Feature: Add reference screenshots for complex bundled test 3D model files

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-08 16:09:00 +01:00
jwbla
9694f7e8e4 Update CMakeLists.txt to fix gcc/clang++ issue (#5863)
This resolves an issue where using GCC as your C compiler but, say, clang++ as your CXX compiler produces
`error: unknown warning option '-Wno-dangling-reference' [-Werror,-Wunknown-warning-option]`

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-06 11:34:21 +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
Tobias Rittig, Ph.D.
e06b80f6b0 +Add vertex duplication during face normal generation (#5805)
* +Add vertex duplication during face normal generation
`aiProcess_GenNormals` PostProcess now duplicates vertices if they are referenced by more than one polygon which results in the correct faceted appearance.

* Update GenFaceNormalsProcess.cpp

- Fix old spellings
- Use static_cast instead of c-style casts

---------

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-11-02 09:03:59 +01:00
Steve M
401279e2f9 Update tinyusdz (#5849)
* Update tinyusdz to latest git commit

* Update patch file

* Bump to latest tinyusdz version

* Remove unused var (fix broken build for clients treating warnings-as-errors)

---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
2024-11-01 11:33:50 +01:00
Gene Walters
7634cf84ca USD Skinned Mesh (#5812)
USD: Skinned Mesh support
2024-10-31 21:48:28 +01:00
Gene Walters
ec563823b6 Cleanup unit tests that export files by making sure those files are deleted once the unit test is complete. Moved logging from a .txt to a .log file so that git ignores the files (#5852)
Signed-off-by: AMZN-Gene <genewalt@amazon.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-10-30 10:39:44 +01:00
Kim Kulling
287d7ec213 Readme: Add project activity view item (#5854)
- Experimental view to mak the current activity in the project more visible and transparent
- Will create a more easy to get view onto the base activities like issues, PR and contributors
2024-10-30 10:26:48 +01:00
Steve M
8d5cc3c5d5 Fix issue 5816 (cone.nff load failure): repair faulty line in 3D model file (#5817)
* Add missing numeric value

* Remove superfluous intermediate folder

* Add reference image

* Update path to match superfluous "NFF" removal

* Move reference screenshot to subfolder

---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-10-30 00:13:17 +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
mosfet80
53d4663f29 Update hunter (#5831)
changelog:
https://github.com/cpp-pm/hunter/releases

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-10-24 11:04:49 +02:00
Steve M
f6c62605c7 Simplify re-enabling M3D build support (#5835)
* Use CMake options to control M3D source compilation

* Revert .cpp file changes (better to treat them as external 3rd party code)

* Improve documentation

---------

Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
2024-10-23 19:46:23 +02:00
mosfet80
720eae1396 Update inno_setup-actions (#5833)
changelog:
https://github.com/Minionguyjpro/Inno-Setup-Action/releases

Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
2024-10-22 16:15:28 +02:00