Commit Graph

5601 Commits

Author SHA1 Message Date
awr1
b3f61f8759 Fix error where -Wunused-but-set-variable might not be available 2020-07-14 21:44:33 -05:00
awr1
3bf6963d20 Use a better divider for import error 2020-07-14 21:34:30 -05:00
awr1
93d567e3b1 Fix sprintf format string 2020-07-14 21:32:22 -05:00
awr1
700d8e6614 Fix MinGW builds (issues related to pragmas and format strings) 2020-07-14 21:19:07 -05:00
Rahul Sheth
abc6b9ce4c ifdef fixes to fix MSVC warnings 2020-07-14 19:00:38 -04:00
Rahul Sheth
209a61d0e7 Update hunter and utf8cpp inclusion 2020-07-14 19:00:23 -04:00
Ryan Styrczula
84e342acd7 DefaultIOStream: Remove assert on empty count
fwrite() is valid to call with a 0 count, and will simply return 0.
See:
    https://en.cppreference.com/w/cpp/io/c/fwrite
    http://www.cplusplus.com/reference/cstdio/fwrite/

There are code paths where StreamWriter will call Tell(), which calls
Flush(), which calls Write(buffer.data(), 1, buffer.size()). This can
happen when nothing has yet been written to the buffer, so size is 0.
2020-07-14 10:39:18 -04:00
Kim Kulling
b19ebf5d54 Fix merge conflicts. 2020-07-14 09:02:14 +02:00
Kim Kulling
8cfd2a4cc1 Migrate OgreSerializer. 2020-07-14 09:00:06 +02:00
Kim Kulling
f5d5d7c5ed Merge branch 'master' into master 2020-07-13 20:35:24 +02:00
Ryan Styrczula
0c2f7a119c FBXExporter: Forgot WritePropColor defaultValue 2020-07-13 13:56:06 -04:00
Ryan Styrczula
6619ec8253 FBXExporter: Use scene metadata for global settings
Models with non-standard axes and scale are not imported and exported
correctly if the input metadata is ignored.
2020-07-13 13:56:06 -04:00
Kim Kulling
78d0b81b6c Merge branch 'master' into patch-1 2020-07-12 18:54:34 +02:00
Kim Kulling
eaac92830a Merge branch 'master' of https://github.com/LoicFr/assimp into LoicFr-master 2020-07-12 12:05:34 +02:00
Kim Kulling
b1dd77fbbc Merge branch 'master' into gltf2_sparseAccessor_export 2020-07-11 22:57:31 +02:00
Kim Kulling
306e03d497 Merge branch 'master' into extras_property_callback 2020-07-11 22:46:19 +02:00
Kim Kulling
21678df589 ogre + collada migration. 2020-07-10 22:25:38 +02:00
Robert Reif
628394baec check for invalid vertex 2020-07-07 23:29:54 -04:00
kimkulling
9aa468262f closes https://github.com/assimp/assimp/issues/3252: fix build. 2020-07-07 17:35:03 +02:00
Robert Reif
6c29247180 add triangle strip support to AC file loader 2020-07-06 17:41:14 -04:00
Max Vollmer (Microsoft Havok)
fb11705dd0 Merge branch 'master' into gltf1_gltf2_split 2020-07-06 09:11:06 +01:00
Max Vollmer
abf43eaf74 * Added ASSIMP_BUILD_NO_GLTF1_IMPORTER, ASSIMP_BUILD_NO_GLTF2_IMPORTER, ASSIMP_BUILD_NO_GLTF1_EXPORTER, and ASSIMP_BUILD_NO_GLTF2_EXPORTER to allow disabling GLTF1 and GLTF2 independently.
* ASSIMP_BUILD_NO_GLTF_IMPORTER and ASSIMP_BUILD_NO_GLTF_EXPORTER remain with same behavior as before
2020-07-05 19:22:31 +01:00
Kim Kulling
d04f8b3174 Merge branch 'master' into defsIncludeFix 2020-07-05 18:59:37 +02:00
Kim Kulling
77b705048b fix merge issues. 2020-07-04 13:42:23 +02:00
Kim Kulling
839986ca14 next step of AMF-Migration. 2020-07-04 09:04:06 +02:00
Hill Ma
3fb7747429 Improve ToBinary() for double precision.
The constant 0x80000000 is specific to 32 bit types. Make the bit mask
according to the size of types.
2020-07-03 18:14:45 -07:00
Kim Kulling
d74c10dcb7 Merge branch 'master' into pugi_xml 2020-07-03 17:29:38 +02:00
Malcolm Tyrrell
51150cb3df Ensure asserts are defined where expected. 2020-07-02 14:53:29 +01:00
Kim Kulling
693da43095 closes https://github.com/assimp/assimp/issues/3305: remove merge issue. 2020-07-02 15:22:06 +02:00
Kim Kulling
b1369d0912 next steps. 2020-07-02 15:18:59 +02:00
Kim Kulling
7fda533484 Merge branch 'master' into double 2020-06-30 21:12:02 +02:00
Yingying Wang
97085c1c05 update sync 2020-06-30 11:48:37 -07:00
Yingying Wang
36f899bf09 sync update 2020-06-30 11:45:11 -07:00
Yingying Wang
3f2e5518eb update sync 2020-06-30 11:29:08 -07:00
Marc-Antoine Lortie
03340787ec Fixed variable in loop - HL1MDLLoader.cpp
Commit 7e5a0acc48 made changes to HL1MDLLoader.cpp. Several variables have been renamed. A loop variable 'i' was renamed to faceIdx, but one reference was left unchanged.
2020-06-29 07:50:51 -04:00
Kim Kulling
eeb4a981bd Merge branch 'master' into patch-2 2020-06-29 09:55:55 +02:00
Hill Ma
30f09e9fc0 Fix build when ASSIMP_DOUBLE_PRECISION is on.
Tested:
$ cmake -DASSIMP_DOUBLE_PRECISION=1 -DASSIMP_BUILD_MDL_IMPORTER=0 ..; make

The MDL importer is disabled due to the fact that there is some float-only code
in MDL. This also means bin/assimp and bin/unit would not link successfully with
the above build flags.
2020-06-28 17:36:21 -07:00
Kim Kulling
fb20e15163 start to migrate colladat and amf 2020-06-27 15:57:06 +02:00
Evangel
6d85280c8d Added bool, removed unused debug parameter 2020-06-27 12:53:26 +10:00
Evangel
f6b4370f6a Added arbitrary recursive metadata to allow for glTF2's extensions to be properly represented.
Primary changes are to include/assimp/metadata.h, adding in the aiMetadata GetAiType function,
adding the operator= to allow an aiMetadata type to be assigned, adding a check for the
AI_AIMETADATA type flag as it can't be trivially memcpy'd.

operator= is implemented with a by-value argument as then the copy is made by the copy
constructor and we can just swap everything out and let the destructor handle the mess.

Implemented parsing of the "extensions" flag on all glTF2 Nodes. Doesn't use the ReadValue
helper function on numbers as it did not seem to fill out the Nullable structure properly.
2020-06-26 14:28:41 +10:00
Kim Kulling
b7b38c2282 Merge branch 'master' into patch-2 2020-06-25 16:52:40 +02:00
Kim Kulling
ba6af9ff98 Merge branch 'master' into FindInvalidData 2020-06-25 16:41:24 +02:00
Kim Kulling
95e822a6ec Merge branch 'master' into aiAssertHandler 2020-06-24 20:47:10 +02:00
Kim Kulling
1466bbacf8 fix unittests. 2020-06-24 20:30:02 +02:00
Kim Kulling
ae05dbb252 define CheckValidFacesIndices also in release builds. 2020-06-23 21:11:18 +02:00
Kim Kulling
6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
Malcolm Tyrrell
9188f56839 Allow assert handling to be replaced. 2020-06-23 11:55:51 +01:00
Ryan Styrczula
5717ea466f FindInvalidDataProcess: Mark removed meshes as "out"
There's a code path where an input scene only has a single mesh.
In this case, if ProcessMesh returns 2, we delete the mesh and move on
with the postprocessing. UpdateMeshReferences is not called and so the
deleted mesh is left dangling in nodes.

In a later step (SplitMesh in my testing), it then tries to deference a
null pointer and we explode.

With `out = true`, we can now hit the DeadlyImportError instead of a
segfault.
2020-06-22 17:24:16 -04:00
Filip Lundgren
2006286528 Fix Maya PBR & stingray texture detection 2020-06-22 23:14:16 +02:00
Filip Lundgren
ba09e1ef94 Fix Blender .fbx metalness detection 2020-06-21 23:56:11 +02:00