- Ensure that code scanner will identify pointer as already released.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* Prefix MTL textures with the MTL directory path.
Path to textures defined in MTL files are relative to the MTL
file rather than to the OBJ, so we need to prefix them with the
MTL file directory path.
* Adding test issue 2355
* Trying to fix for Windows when file has Linux path
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* 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>
* [FBX] Allow export multi materials per node
Previously it was assumed that each node would export a single material. This removes that
assumption, and also allows for exporting multiple meshes with a single node. Previously they
would each be seprated into their own node.
* Support for animations with multiple meshes too
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
While one of the throws in the function did indeed close the open stream,
several didn't.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
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>
* 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.
* 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>
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>
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>
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>
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>