Commit Graph

124 Commits (093e35dd54489232bbc9ed3e12f984747994b268)

Author SHA1 Message Date
Hill Ma 148b8c66a8 glTF2: zero out extra space created by padding.
This makes resulting GLB deterministic.
2021-06-15 15:18:20 -07:00
Evangel 3de20af3cc Renamed glTF2::Object::extensions to customExtensions to avoid shadowing in other subclasses. 2021-06-12 13:16:53 +10:00
Evangel a7a30baf27 Renamed local variable to avoid shadowing member variable. 2021-06-12 13:08:14 +10:00
Evangel 7f0efa0866 Added ReadExtensions to glTF2::Object, so all objects now have their extensions read.
Importer is the only place that needs to be modified to make them available on the Assimp side now.
2021-06-12 12:50:44 +10:00
Evangel 6d413444b5 Merge branch 'master' of https://github.com/Evangel63/assimp 2021-06-12 11:46:20 +10:00
Evangel 36c8cdf3de Add scene metadata for glTF2 files as allowed by the glTF2 specification. 2021-06-12 11:44:28 +10:00
Kim Kulling 70cc1630fa
Merge branch 'master' into fix-gcc4.9-compilation 2021-05-27 15:25:01 +02:00
Kim Kulling b5e54e4d3b
Merge branch 'master' into wangyi_basisu 2021-05-25 16:17:29 +02:00
Jean-François Verdon b7b3c6db7e Fixing GCC 4.9 compilation issues 2021-05-22 16:57:07 +02:00
ywang 2b9d88c943 support basis universal 2021-05-06 15:10:06 -07:00
Max Vollmer (Microsoft Havok) 746d5cf964 * Throw instead of assert on invalid file input
* Check JSON object type before accessing members
* Ensure samplers input and output references are set before accessing them
2021-04-21 16:17:03 +01:00
Kim Kulling 5f652feb75
Merge branch 'master' into MalcolmTyrrell/gltfCrashes 2021-03-19 13:35:13 +01:00
Hill Ma 3e99385f44 Fix a memory leak in glTF2.
The destructor of LazyDict uses `delete` but `delete` was not used for objects removed by LazyDict::Remove.
2021-03-17 15:12:54 -07:00
Malcolm Tyrrell 3503252e12 Strict check for accessor "count" 2021-03-16 11:47:19 +00:00
Malcolm Tyrrell e4983aa16e Fix code issue 2021-03-15 16:46:41 +00:00
Malcolm Tyrrell 57652a9084 Version is strictly a string 2021-03-15 16:27:50 +00:00
Malcolm Tyrrell 053c0f5e0a Catch type errors in gltf and try to print out useful context. 2021-03-15 13:06:11 +00:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
Kim Kulling c669c8f1eb
Merge branch 'master' into update_copyrights 2021-02-28 12:18:41 +01:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Kim Kulling 6094da3493
Update glTF2Asset.inl 2021-02-18 09:32:37 +01:00
RichardTea 48bcbbefdd use nullptr and float constants 2021-01-27 10:56:57 +00:00
RichardTea 150514fc8b Move draco warning suppression
Should be around the include for portability, not template instantiation
Fix clang pragma typos
2021-01-27 10:42:28 +00:00
RichardTea 6ec32b6b78 Apply clangformat 2021-01-27 09:55:03 +00:00
RichardTea c6fd1ce996 glTF2 Minor cleanup 2021-01-27 09:42:49 +00:00
RichardTea 5b9d06c2fc Disable draco clang/gcc warnings via pragma
draco templated functions also throw warnings
2021-01-27 09:19:35 +00:00
RichardTea d79e0c0ba9 Avoid std::make_unique
Assimp is still C++11
2021-01-26 17:33:10 +00:00
RichardTea f39ba8ddb2 Add compile error for bad error draco config
KHR_draco_mesh_compression requires
DRACO_MESH_COMPRESSION_SUPPORTED
2021-01-26 16:24:18 +00:00
RichardTea dde7605158 Implement draco decoding 2021-01-26 16:08:12 +00:00
Max Vollmer d49aed4585 * Check that buffer view has buffer
* Handle integer overflow when calculating byte length
* Minor code cleanup for exception messages
2021-01-11 08:45:47 +00:00
Danny-Kint 07aace0fdd
Merge branch 'master' into dev/gltf-KHR_materials 2020-12-31 07:08:31 +01:00
Maki ca653e0c6a Fix glTF from memory loading .bin with a custom IOHandler 2020-12-28 07:18:50 +00:00
Danny Kabrane 2b097c1e73 Add KHR_materials_transmission during import 2020-12-23 10:43:01 +01:00
Danny Kabrane f8c63d874b support KHR_materials_clearcoat during import 2020-12-23 08:12:09 +01:00
Danny Kabrane 63b0a97369 import KHR_materials_sheen 2020-12-20 07:59:12 +01:00
Max Vollmer 7d72c78c8e Some improvements 2020-11-30 15:20:51 +00:00
Max Vollmer 6ed1488e6e * Improved error messages
* Throw instead of asserts on invalid file input
2020-11-30 15:04:06 +00:00
Evangel 30584c1ec1 Replaced name with scene_name to avoid shadowing. 2020-11-22 15:36:08 +10:00
Evangel 67abcb10ba Added mName to aiScene. Primarily to provide access to the "name" member of glTF2 scenes. 2020-11-22 15:33:31 +10:00
Kim Kulling c4ba5eeeea
Merge branch 'master' into issue_3500 2020-11-16 21:52:14 +01:00
Jean-François Verdon 09ca11d063 Fixing issue 3500, invalid outer cone angle readed from gltf2 file on machines which defines M_PI as a double value 2020-11-16 09:19:13 +01:00
Malcolm Tyrrell 0f246edb97 Prevent GetValue from corrupting memory 2020-11-06 13:43:16 +00:00
Malcolm Tyrrell 34e3e6293a Style 2020-11-06 09:57:48 +00:00
Malcolm Tyrrell 0af05e7a60 Better message 2020-11-05 15:10:52 +00:00
Malcolm Tyrrell 01b2088dd3 A missing bufferview was causing a crash. 2020-11-05 15:02:41 +00:00
Max Vollmer 4006bb71f4 Fixes for crashes in GLTF2 Importer 2020-10-23 12:01:43 +01:00
Max Vollmer (Microsoft Havok) 9c1edaee96
Merge branch 'master' into gltfBufferViewSizeFix 2020-09-16 10:08:47 +01:00
Max Vollmer 615ffdf93f What: Throw instead of assert when input file is invalid.
Why: Assimp shouldn't crash on invalid files. Asserts are disabled on Release builds.
2020-09-10 10:47:58 +01:00
Malcolm Tyrrell 0f6127e90e No need to build strings. 2020-08-18 18:21:20 +01:00
Malcolm Tyrrell b7c789da67 Stop concatenating std::strings. Use formatter. 2020-08-18 17:35:08 +01: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
Yingying Wang 3f2e5518eb update sync 2020-06-30 11:29:08 -07: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
kimkulling ad62e6e863 fix unittest check - cannot work, just crash shall not occurr any more. 2020-06-12 12:29:51 +02:00
Yingying Wang 98767cbb08 pull master 2020-05-27 10:23:28 -07:00
Kim Kulling 78c9ac2889
Merge branch 'master' into gltf2_sparseAccessor_import 2020-05-25 16:11:01 +02:00
Kim Kulling ecfca1d5c5
Merge branch 'master' into verboseLogging 2020-05-21 18:30:52 +02:00
Yingying Wang c10e409a5d merge 2020-05-18 12:16:45 -07:00
Yingying Wang 193deb3441 cleanup 2020-05-18 12:01:09 -07:00
Yingying Wang e39c632809 cleanup 2020-05-18 11:50:51 -07:00
Yingying Wang 0897c4c7be merge 2020-05-18 11:31:44 -07:00
Yingying Wang 02cbd36271 pull master 2020-05-18 11:15:18 -07:00
Yingying Wang b8e39b58d1 clean up 2020-05-15 12:32:58 -07:00
Yingying Wang f6720271cb sparce accessor exporter 2020-05-15 12:20:31 -07:00
Malcolm Tyrrell 90cdbd9d9a Fix ups 2020-05-15 17:46:50 +01:00
Matias Kangasjärvelä 7a16a7a7e4 Fix infinite recursion in gltf2 skin parsing
Previously parsing a node caused the skin that was attached to it
to be parsed, which caused the skins node joints to be parsed,
which could cause the skin to be re-parsed leading to infinite or
at the very least exponential recursion.

The fix is to just get a reference to a temporarily uninitialized
skin as they were being parsed after the scene graph just to be safe
anyway. This way we avoid the recursion problem and all the references
will be valid in the end.
2020-05-15 16:48:41 +03:00
kimkulling 246ec2b0dc Merge branch 'migenius-fix-ortho' of https://github.com/migenius/assimp into migenius-migenius-fix-ortho 2020-05-15 13:37:03 +02:00
kimkulling a6b5abd698 Merge branch 'master' of https://github.com/zyndor/assimp into zyndor-master 2020-05-15 08:51:46 +02:00
Yingying Wang e9b67cdb89 gltf2 import sparse accessor 2020-05-11 14:34:35 -07:00
Yingying Wang 60e8146b9f fix wrong target idx when importing 2020-05-05 12:51:40 -07:00
Kim Kulling f8e6512a63 Move format importer and exporter into its won folder. 2020-05-02 15:14:38 +02:00