* 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>
* 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>
* +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>
* 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>
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>
* 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>