Added cmake code to remove warnings for array-bounds and stringop-overflow specifically for MDLLoader.cpp on GCC 13 and above.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Reverts the changes introduced by commit ad766cb in February 2022.
Explanation why the old code was just fine is given in Q&A #5512.
* Added that missing ;
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* CMake: Mark draco as a private dependency since assimp does not publicly expose its interface.
* CMake: Allow linking draco statically if ASSIMP_BUILD_DRACO_STATIC is set.
The latest Cineware SDK explicitly asserts macOS support in its
documentation, but Assimp's C4D importer only works with Windows MSVC
targets. Let's improve its portability by refactoring importer code to
not depend on MSVC-only data types and quirks, and add support for linking
against the universal macOS static libraries provided in the Cineware
SDK.
Note that the C4D importer still cannot support Linux platforms because
Maxon does not provide the necessary precompiled Cineware libraries for
that platform. Windows MinGW targets are also out of the question as the
MinGW toolchain uses compiled libraries in a different format.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
- std::min/max were not defined in StackAllocator.inl; Also added explicit template arguments to break macro expansion if Windows.h is included prior and NOMINMAX macro is not present.
- Made static_assert statements compatible with C++11 in ProcessHelper.cpp.
- Removed unused string_view include in ObjFileParser.cpp.
* ColladaParser: check values length
fixes: #4286
* Refactor calculation of size for data
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Fix identity matrix check
Adds an extra epsilon value to check the matrix4x4 identity. The method is also used to export to GLTF/GLTF2 format to check node transformation matrices. The epsilon value can be set using AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON with the default value set to 10e-3f for backward compatibility of legacy code.
* Fix type of float values in the unit test
* Update matrix4x4.inl
Fix typo
* Update matrix4x4.inl
Remove dead code.
* Add isIdentity-Test
* Update AssimpAPITest_aiMatrix4x4.cpp
---------
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
When loading a mesh exported from assimp into Blender, it warns that it has an incorrect class.
While debugging, I traced it back to this being `Blendshape` where `Geometry` was expected. This
is likely because this node describes a `Geometry`, which is used as a blendshape. I'm not sure
if any other DCC tools or places to import it expect `Blendshape` instead (i.e. was this code
ever tested?), but it fixes its use in Blender.
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
* Update XFileImporter.cpp
Comment out boneIdx conditional which caused massive breakage
* Update XFileImporter.cpp
Fix typo
* Update XFileImporter.cpp
Dummy whitespace change to attempt to re-trigger failing CI tests
---------
Co-authored-by: Steve M <praktique-tellypresence@yahoo.com>
Co-authored-by: Kim Kulling <kimkulling@users.noreply.github.com>
The previous table was in an incorrect order, leading to index references in DXF producing the wrong colours when converted.
Also added other entries to bring the total number of ACI colours up to the number that can be used in DXF files
Changed order of operations for insert positioning and scaling. Need to position the inserts before scaling it, otherwise the position ends up up being position*scale
Currently, when the coordIndex attribute of an IndexedLineSet contains a
polyline with > 2 indices, X3DGeoHelper::coordIdx_str2faces_arr() will
incorrectly determine the primitive type to be aiPrimitiveType_TRIANGLE or
aiPrimitiveType_POLYGON instead of aiPrimitiveType_LINE.
To fix this, this commit adds functions to explicitly handle an IndexedLineSet.
Fixes#3101
The regression was introduced in 904f17f.
Since all the cases are now fully handled at the child level,
visiting the whole subtree is changed into iteration over the children.
Previously was reading a uint, which always failed. Since the output was never checked, this
seemed to work, and works fine for most models since they only use UV channel 0.
It seems that rotation matrices later expect radians.
This conversion breaks it, and was validated on the conversion of
`cesium_man.glb` --> `cesium_man.fbx`
This let's cmake create config files that allow linking to minizip even when
in an unrelated prefix. This can happen with package managers that install
every package into their own prefix, such as [Spack](https://spack.io).