Commit Graph

87 Commits (52008ec9892c4e5993ea8bcf647ef60dc11badb5)

Author SHA1 Message Date
Sergio Acereda 52008ec989 Apply clang-format 2022-03-03 15:42:23 +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 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
Kim Kulling 50c7301a38 Update copyrights 2022-01-10 21:13:43 +01: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
Kim Kulling 8c0b869998
Merge branch 'master' into MalcolmTyrrell/jsonSchemaSupport 2021-10-28 13:38:41 +02:00
Kim Kulling f3baab1153
Merge branch 'master' into master 2021-10-20 20:51:43 +02: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 200bf8df7a Added gltf2 KHR_materials_volume import support. 2021-09-29 17:05:17 +01: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
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 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
Promit Roy 90c115cb3f
Merge branch 'master' into promit/gltf-extras 2021-07-02 00:38:00 -04:00
Promit Roy 7c822f23bd Added support for custom properties ("extras") in glTF2 2021-06-27 00:53:40 -04:00
Jerome St-Louis 0e41efb050 glTF2: Improved support for AI_MATKEY_OPACITY
- Exporter: Writing opacity to pbrMetallicRoughness.baseColorFactor[3] even when alphaMode is set
- Importer: Setting AI_MATKEY_OPACITY from pbrMetallicRoughness.baseColorFactor[3]
2021-06-24 13:27:29 -04:00
Evangel63 e736538df3
Merge branch 'master' into master 2021-06-23 13:45:23 +10:00
RichardTea 985f3ee665 Fix glTFv2 texcoord/uv mapping
Use the standard property to indicate the UV map index
2021-06-14 15:11:41 +01:00
RichardTea fb039bb9eb Add glTFv2 Clearcoat import/export tests
Uses Clearcoat model from Khronos
2021-06-14 15:11:41 +01:00
RichardTea 4a66ec25d0 Standardise Clearcoat, Sheen and Transmission
Also cleanup glTFv2 defaults, don't import/export if disabled
2021-06-14 15:11:41 +01:00
RichardTea 4476352882 First pass at simplifying glTFv2 PBR
Removed 'core' set of GLTF-specific properties
2021-06-14 15:11:41 +01:00
Evangel 3de20af3cc Renamed glTF2::Object::extensions to customExtensions to avoid shadowing in other subclasses. 2021-06-12 13:16:53 +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 6b8a00dfa1
Merge branch 'master' into wangyi_basisu 2021-05-25 17:17:07 +02:00
Kim Kulling b5e54e4d3b
Merge branch 'master' into wangyi_basisu 2021-05-25 16:17:29 +02:00
Kim Kulling faeae27923
Merge branch 'master' into importer_fixes_followup 2021-05-25 16:15:09 +02:00
Malcolm Tyrrell 4ec01cfdcd Improve use of logging 2021-05-13 12:05:31 +01:00
Malcolm Tyrrell 5cd3bdd5c2 No need to distinguish formatting log functions. 2021-05-13 10:25:27 +01:00
ywang a19b708144 support both ktx and ktx2 2021-05-07 16:27:23 -07:00
ywang 2b9d88c943 support basis universal 2021-05-06 15:10:06 -07:00
Max Vollmer (Microsoft Havok) 153b890b02 Prevent accessing nullpointers 2021-05-05 14:09:43 +01:00
Krishty b79b84d34e Merge branch 'master' into new-file-detection 2021-05-05 00:09:42 +02:00
Max Vollmer (Microsoft Havok) e1d6e1f377
Merge branch 'master' into ms-maxvollmer/importer_fixes 2021-04-26 14:53:32 +01:00
Krishty b00de10eb3 Simplified importer search and fixed a few bugs
The search for a matching importer had a few issues, see #3791. There were two different mechanisms to determine whether an importer accepts a specific file extension:
1. `aiImporterDesc::mFileExtensions`, which was forwarded to the UI via `BaseImporter::GetExtensionList()`.
2. `BaseImporter::CanRead()` when called with `checkSig == false`, which determines whether to actually use that importer.
Both were redundant and got out of sync repeatedly. I removed 2. completely and replaced it with 1., thereby syncing UI/import and shortening all `BaseImporter::CanRead()` implementations.

Further bugfixes:
- fixed glTF2 importer throwing exceptions when checking whether it can load a file
- removed `BaseImporter::SimpleExtensionCheck()` because it is no longer used and had a bug with case sensitivity

Since the `checkSig` parameter in `BaseImporter::CanRead()` is now useless, it can be removed completely. I’m not sure if this would break ABI compatiblity, so I’ll submit it with a later pull request.
2021-04-24 00:17:50 +02: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
Krishty 6cbeca5518 fixed glTF export stuff being pulled into the EXE even if building with ASSIMP_BUILD_NO_EXPORT
“LazyDictBase::WriteObjects()” in the two glTF implementations is only used for export. Since it’s a virtual method, and many compilers have trouble removing unreferenced virtual methods, glTF export stuff is pulled into the binary even if compiling without exports.

This commit removes said virtual function if only compiling for import.

This removes 75 KiB of useless code when compiled with Visual Studio for x64.
2021-04-16 20:44:40 +02:00
Malcolm Tyrrell d94ddd32b1 Extra check. Better logging. 2021-03-24 11:04:39 +00:00