Commit Graph

347 Commits (97cbecb859375625fae43059db696a439b159a0c)

Author SHA1 Message Date
Kim Kulling 3e20502e0f
Merge branch 'master' into fix_gltf2_camera_fov 2023-01-23 19:14:42 +01:00
Kim Kulling f2f967b8ba
Merge branch 'master' into remove-useless-virtual 2023-01-22 20:25:45 +01:00
shimaowo b298b79a46 add missing parens 2023-01-17 10:53:41 -08:00
Krishty 36305cf987 Tidy Up Constructors and Destructors
This commit does not add or remove c’tors or d’tors, so it is *not* ABI-breaking.

If a c’tor/d’tor does nothing else than the default behavior, this commit replaces it with “= default”.

If an initializer list entry does nothing else than the default behavior, this commit removes it. First and foremost, remove default c’tor calls of base classes (always called by the compiler if no other base c’tor is explicitly called) and c’tor calls of members with complex types (e.g. “std::vector”).

In a few instances, user-defined copy c’tors / move c’tors / assignment operators / move assignment operators were replaced with “= default”, too. I only did this if I had a clear understanding of what’s going on.
2023-01-16 21:47:11 +01:00
Krishty 43a062a5d7 Remove Stray Semicolon 2023-01-16 20:45:00 +01:00
shimaowo 39cbef1e21 Fix: fix incorrect math for calculating the horizontal FOV of a perspective camera in GLTF2 import #4435 2023-01-16 11:39:13 -08:00
Krishty 3d3e856925 Trim Trailing Whitespace 2023-01-16 09:12:35 +01:00
Krishty e5c02e8d45 Remove Useless “virtual”
These functions are already marked “override”, and their neighbors had “virtual” removed as well.
2023-01-16 08:12:24 +01:00
Adam Beili 54068637ee
Merge branch 'master' into refactor/KHR_material_specular 2022-11-29 17:35:52 +01:00
Kim Kulling 8fb7ba3444
Merge branch 'master' into modernize-smartptrs-literals 2022-11-29 09:58:17 +01:00
Adam 1cd5841b2f . 2022-11-18 17:24:37 +02:00
Adam 822b240694 Support both pbrSpecGlos and materials_specular 2022-11-08 23:09:50 +02:00
Adam Beili 95d98ec98b
fixed indentation error 2022-11-08 20:55:20 +02:00
Aaron Gokaslan ccfb175460 Apply various clang-tidy checks for smartprs and modern C++ types 2022-11-08 11:03:55 -05:00
Adam Beili 945d93b46a fixed indentation 2022-11-04 09:37:28 -07:00
Adam 852ea8325c Added support for KHR_materials_emissive_strength
according to spec https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_emissive_strength
2022-11-03 23:11:21 +02:00
Aaron Gokaslan e3b01e10db apply fixes to more headers 2022-09-01 12:28:45 -04:00
Aaron Gokaslan e93fa6699a Manually fix up 100 more instances where it should be defaulted 2022-08-25 12:20:13 -04:00
Kim Kulling 89c4640744
Merge branch 'master' into master 2022-08-16 20:53:45 +02:00
Bengt Rosenberger abfe8ad413 Added suggested changes and fixed automated check errors 2022-08-01 14:39:10 +02:00
Bengt Rosenberger f20071d740 Merge remote-tracking branch 'origin/gltf2_metadata_export' into gltf2_metadata_export 2022-08-01 14:12:33 +02:00
Bengt Rosenberger da58fbe8fb Got rid of gltf2::ExtrasValue and used gltf2::CustomExtension instead 2022-08-01 14:12:27 +02:00
Bengt Rosenberger cb4d0ab7aa Added missing member copy in gltf2::ExtrasValue ctor. 2022-08-01 14:12:27 +02:00
Bengt Rosenberger 233198baef Fixed extras presence check in gltf2 import. 2022-08-01 14:12:27 +02:00
Bengt Rosenberger 99c3104588 Rewrote gltf2 node extras import and added node extras export.
No support for AI_AIVECTOR3D metadata type. No support for json arrays of metadata, just json objects.
2022-08-01 14:12:27 +02:00
Bengt Rosenberger bdee65e577 Got rid of gltf2::ExtrasValue and used gltf2::CustomExtension instead 2022-07-22 01:33:05 +02:00
Bengt Rosenberger 517fd3c76c Added missing member copy in gltf2::ExtrasValue ctor. 2022-07-22 01:07:42 +02:00
Bengt Rosenberger 5a2b811ba3 Fixed extras presence check in gltf2 import. 2022-07-22 01:04:05 +02:00
Bengt Rosenberger 417481d17f Rewrote gltf2 node extras import and added node extras export.
No support for AI_AIVECTOR3D metadata type. No support for json arrays of metadata, just json objects.
2022-07-22 00:44:51 +02:00
Engin Manap 3890b5dff5 Add missing = operator
implicit assignment operator is depricated, these classes were missing
explicit definitions of this operator.
It is causing warnings, specifically  -Werror=deprecated-copy
2022-07-08 18:16:02 +02:00
PercentBoat4164 487a9aca2f Add support for GCC v12 2022-06-16 19:23:55 -04:00
Kim Kulling 02b0c89fa4
Fix usage of validation 2022-06-08 00:10:13 +02:00
Kim Kulling 4fb5cf4ba6
Fix possible nullptr exception
- closes https://github.com/assimp/assimp/issues/4418
2022-06-07 23:33:56 +02:00
Kim Kulling ae9f5b6fc5
Merge branch 'master' into user/jakras/bitangent-fuzzer-fix 2022-04-12 10:41:43 +02:00
xiaohunqupo de6e90a657 Fix commit error 2022-03-31 15:36:57 +08:00
xiaohunqupo 2152aae2a3 Fix compile error due to namespace conflicts in VC140. 2022-03-31 15:34:49 +08:00
Jan Krassnigg 537c46a42a Prevent nullptr access to normals-array in bitangent computation 2022-03-23 15:45:09 +01:00
Promit Roy 5ec7e57b99
Merge branch 'assimp:master' into master 2022-03-17 15:00:09 -04:00
Promit Roy 68d33a6e13 Added support for more bone weights in GLTF2
The GLTF2 importer doesn't actually read beyond the first four bone weights (first attribute). This patch expands the parser to store as many bone weights as are available in the file.
2022-03-17 14:55:26 -04:00
Promit Roy 765b38cf04 Update glTF2Asset.inl
Fixing mistakes in attribute names for GLTF. This causes attribute index to not be parsed out correctly (e.g. JOINTS_1) and fails the scene load.
2022-03-16 16:49:45 -04:00
Sergio Acereda cfe84b9260 Use generic METALNESS and DIFFUSE_ROUGHNESS texture types 2022-03-03 16:18:25 +01:00
Sergio Acereda 52008ec989 Apply clang-format 2022-03-03 15:42:23 +01:00
Kim Kulling 6f31254ae1 Ensure dictionary for LazyDics is created before adding content to it 2022-02-23 20:57:15 +01:00
Kim Kulling 466b34cf53
Merge branch 'master' into kimkulling/fix_ordering_of_gltf2_issue4407 2022-02-22 21:09:11 +01:00
Kim Kulling aa04ee89f1 Fix init order to fix build 2022-02-22 21:07:42 +01:00
Kim Kulling 17d5633a5b Add missing SImpleExtensionCheck 2022-01-19 21:42:14 +01:00
Kim Kulling 5af79cac1d Fix unittests + small refactorings 2022-01-18 21:23:43 +01:00
Kim Kulling 6ad7505376
Merge branch 'master' into krishty-new-file-detection 2022-01-16 20:43:57 +01:00
Kim Kulling 05746acb07 Merge branch 'new-file-detection' of https://github.com/krishty/assimp into krishty-new-file-detection 2022-01-16 20:41:24 +01:00
Viktor Kovacs c71f4bc95a
Merge branch 'master' into common_base64 2022-01-11 18:46:08 +01:00
Viktor Kovacs 6b9732721a
Merge branch 'assimp:master' into common_base64 2022-01-10 21:15:31 +01:00
Kim Kulling 50c7301a38 Update copyrights 2022-01-10 21:13:43 +01:00
Colin Reeder 87e9dbac40
Fix bone fitted check in gltf2 exporter 2022-01-03 16:32:34 -07:00
kovacsv bbe12240ca Move Base64 encode/decode functionality to the common folder. 2022-01-02 19:47:43 +01:00
Kim Kulling cb657e4c13 Use correct XmlParser-methods and add some missing casts 2021-12-13 18:06:23 +01:00
Max Vollmer (Microsoft Havok) 0015823bef Reject files with an invalid byteLength value 2021-11-26 13:01:15 +00:00
Jan Krassnigg 1a5d66714f Prevent out-of-range memory writes by sparse accessors
This turned up during fuzz testing. Corrupted data would make assimp write to random memory locations, leading to subsequent crashes.
2021-11-25 11:20:26 +01:00
ruyo 60bfde78eb Fixed an incorrect indeiciesType in the glTF2 sparse accessor. 2021-11-21 23:23:22 +09:00
RichardTea c24f99cd0e Redefine deprecated glTF-specific PBR material macros
Intended to support Qt5 QtQuick3D until it is ported to generic PBR
macros.
2021-11-16 11:42:59 +00:00
freizhang b9937994ca Fix glTF2 skinning bone weight exporting issue 2021-11-13 12:07:29 +08:00
freizhang 1407491a67 glTF2 exporter buffer overrun issue fix. 2021-11-13 11:52:49 +08:00
Kim Kulling e2ccd17494
Fix typo 2021-11-12 11:20:22 +01:00
Kim Kulling 157e032bde
Fix small findings
- Merge anonymous functions into one block.
- Some reformattings
2021-11-12 11:08:19 +01:00
Kim Kulling 37c81e7a28
Merge branch 'master' into MalcolmTyrrell/jsonSchemaSupport 2021-11-12 10:37:19 +01:00
Kim Kulling 43b0ef181a
Merge branch 'master' into fix_gltf_warning_4126 2021-11-11 20:30:07 +01:00
RichardTea aaae3e3a10 size_t is 32bit on some platforms
Also assert if size_t is smaller than uint32_t (probably not necessary)
Note: 32bit builds will crash OOM if a really large model is loaded, as cannot allocate that much in total, let alone contiguously.
2021-11-08 15:05:20 +00:00
RichardTea 9433fc526a Apply clangformat 2021-11-08 14:42:21 +00:00
RichardTea 69cafe64b4 Cap glTFv1 & 2 json size to ~4GB
Ensures size_t cannot overflow
Limits the maximum contiguous memory allocation to something plausible.
2021-11-08 14:41:13 +00:00
Kim Kulling 8c0b869998
Merge branch 'master' into MalcolmTyrrell/jsonSchemaSupport 2021-10-28 13:38:41 +02:00
Kim Kulling 791cb195be
Merge branch 'master' into x3d_pugi_migration_artenuvielle 2021-10-20 21:14:43 +02:00
Kim Kulling f3baab1153
Merge branch 'master' into master 2021-10-20 20:51:43 +02:00
Malcolm Tyrrell ceddfe19d8 Add comment with link to schema repo. 2021-10-07 10:01:32 +01:00
Malcolm Tyrrell a283a255a5 Allow schema checking of glTF2 file. 2021-10-07 10:01:32 +01:00
diharaw 0fb66f8437 Replaced AI_MATKEY_IOR with AI_MATKEY_REFRACTI. 2021-10-07 09:39:08 +01:00
diharaw b01d008bc0 Revert "Removed KHR_materials_ior support."
This reverts commit 0738742611.
2021-10-07 09:36:53 +01:00
diharaw 0738742611 Removed KHR_materials_ior support. 2021-10-07 09:30:22 +01:00
Marc 656b0b25d8
Fix warning for array comparison
The code previously compared two float arrays with the != operator. This is deprecated in Visual Studio 2019 and results in a warning that leads to an error when compiling with warnings as errors. Small fix to make the build work.
2021-10-05 19:24:42 +02:00
diharaw addd541251 Added gltf2 KHR_materials_ior support. 2021-09-30 08:47:53 +01:00
diharaw d3276de47d Added gltf2 KHR_materials_volume write support. 2021-09-30 08:10:02 +01:00
diharaw 200bf8df7a Added gltf2 KHR_materials_volume import support. 2021-09-29 17:05:17 +01:00
Artenuvielle 70dfdb8f9d
Merge branch 'master' into x3d_pugi_migration_artenuvielle 2021-09-15 14:51:38 +02:00
Kim Kulling 0fef0e1101 Move duplicate code to glFT common header. 2021-09-14 20:45:36 +02:00
Kim Kulling 18531e3677 Next iteration for c++11 features. 2021-09-13 22:38:20 +02:00
René Martin 3001d88172 Merge branch 'master' into x3d_pugi_migration 2021-09-07 15:04:08 +02:00
Max Vollmer (Microsoft Havok) bf8e36ae28 Fixed typo 2021-09-02 10:07:28 +01:00
Max Vollmer (Microsoft Havok) 72ea80b41f Revert last change (gltf2::Ref type is not a pointer and has a bool() operator) 2021-09-02 10:00:56 +01:00
Kim Kulling d710d0700f
Make nullptr test more explicit. 2021-09-02 10:10:42 +02:00
Max Vollmer (Microsoft Havok) 4c86772091 Added another nullptr safety check 2021-09-02 08:27:03 +01:00
Kim Kulling df739f00dd
Merge branch 'master' into issue_3398 2021-08-28 13:56:50 +02:00
Max Vollmer (Microsoft Havok) c1e830cf3b The GLTF2 specs aren't very specific about the restrictions of the number of keyframes in sampler input and output. It seems logical that they should be the same, but there is an official sample model from Khronos where output has more keyframes. I thus assume that the GLTF2 standard allows more keyframes in output, but not in input. Fixed the check accordingly. 2021-08-13 17:46:10 +01:00
Max Vollmer (Microsoft Havok) de2f5cf021 Crash fixes 2021-08-13 16:26:42 +01:00
Kim Kulling 4b1ff645e3 closes https://github.com/assimp/assimp/issues/3398: Add support for embedded textures 2021-08-12 21:13:07 +02:00
krishty 1ee2be8c5c
Merge branch 'master' into trim-trailing-whitespace 2021-07-31 18:01:48 +02:00
Krishty bb53961fa9 more range-based for
f6b4370f6a and 7c822f23bd introduced raw loops on data types with heavy nesting; range-based for suits better here
2021-07-29 14:57:25 +02:00
Krishty 758116b083 removed trailing spaces and tabs from source and text
This commit ignores the “contrib” folder in order to prevent merge conflicts in dependencies, should these be updated via git.
2021-07-29 13:28:51 +02:00
Kim Kulling 4e28a3072f
Merge branch 'master' into gltf_fixes 2021-07-23 20:37:25 +02:00
Adrian Perez 30d342534a Fix issues encountered during integration atempt 2021-07-16 14:29:28 -07:00
RichardTea 632b2db97c Ensure glTFv2 scene name is unique
Use the provided scene name if extant
Fixes issue #3978
2021-07-14 13:39:41 +01:00
Promit Roy 90c115cb3f
Merge branch 'master' into promit/gltf-extras 2021-07-02 00:38:00 -04:00
Kim Kulling 240eb36980
Merge branch 'master' into master 2021-07-01 19:23:52 +02:00