Commit Graph

155 Commits (ff2dc2fb2e6ac1777d5f632133710dd822dc4873)

Author SHA1 Message Date
Kim Kulling 18531e3677 Next iteration for c++11 features. 2021-09-13 22:38:20 +02:00
Krishty 5895c0c22c more const in format detection
BaseImporter::SearchFileHeaderForToken() expected a pointer to a non-const token list. This was probably an oversight, as nobody would realistically expect the function to change the list. Furthermore, it prevented token lists from being compiled to read-only memory, in some cases even causing the compiler to generate thread-safe initialization.

The list is now const and all callers declare their token lists static const, thus compiling them to read-only memory.
2021-09-11 23:23:05 +02:00
Kim Kulling 38c611a02c
Update ColladaLoader.cpp 2021-08-30 08:33:35 +02:00
Kim Kulling df739f00dd
Merge branch 'master' into issue_3398 2021-08-28 13:56:50 +02: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 6cb54d1c95
Merge branch 'master' into trim-trailing-whitespace 2021-08-06 09:40:03 +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
Krishty 738c31c3ea removed useless code
Found while reviewing #3880
2021-07-28 16:48:53 +02:00
Kim Kulling b7f88f3063 closes https://github.com/assimp/assimp/issues/3957: checkj for empty positions. 2021-07-26 10:51:16 +02:00
Kim Kulling 5171aa52d1
Remove dead code 2021-07-16 11:47:38 +02:00
RichardTea bff1d012bd Read matrix and input (shared) correctly
<matrix> may have leading and trailing whitespace
<input/> set attribute is unsigned. It is also optional, default 0
2021-07-13 16:50:09 +01:00
RichardTea 206b2436d4 Apply clangformat 2021-07-13 16:47:31 +01:00
Aaron Gokaslan 94c3abd841 Apply various performance fixes from clang-tidy 2021-06-22 12:27:15 -04:00
Kim Kulling 3fa45e6a8c Merge branch 'master' into sml_doc 2021-05-18 21:18:02 +02:00
Kim Kulling e01a6b4276 Add xml doc. 2021-05-18 21:15:48 +02:00
Malcolm Tyrrell 5cd3bdd5c2 No need to distinguish formatting log functions. 2021-05-13 10:25:27 +01:00
Krishty b79b84d34e Merge branch 'master' into new-file-detection 2021-05-05 00:09:42 +02:00
Krishty 0f3e6e2941 replaced std::size() with AI_COUNT_OF for pre-C++20 compilers 2021-05-05 00:08:54 +02:00
Jason C 2925592c64 [assimp] Make sure ctype calls use unsigned char.
Cast to unsigned char as required by C++ (see C++ **[cctype.cyn]** -> ISO C99 section 7.4, [see also](https://en.cppreference.com/w/cpp/string/byte/isspace)).

Addresses https://github.com/assimp/assimp/issues/3867 and then some.
2021-05-04 17:31:13 -04:00
Kim Kulling f29828f657
Merge branch 'master' into fix-file-detection 2021-05-02 19:41:33 +02: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
Krishty 196deea7ce added missing file extensions to aiImporterDesc::mFileExtensions 2021-04-23 15:05:09 +02:00
Krishty f761dc72f4 style fix - initializing and assigning empty std::string properly
std::string s(""); s = ""; calls the copy constructor, which in turn calls strlen(), … assigning a default-constructed string generates fewer instructions and is therefore preferred.

With C++11 uniform initialization, you’d simply write s = { } instead.
2021-04-16 23:43:56 +02:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
contriteobserver 111752cff0 workaround for ASSIMP_DOUBLE_PRECISION compile errors
changed float types to ai_real types as needed

addresses issue #3682
2021-02-28 14:45:39 -08:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Kim Kulling c9ca921d09
Merge branch 'master' into ColladaAnimationFix 2021-02-08 20:46:18 +01:00
Gargaj 8ae8b165ca
fix compile warning-turned-error on x86 2021-02-08 00:37:06 +01:00
Kim Kulling cb15a0d8b0
Merge branch 'master' into ColladaAnimationFix 2021-02-07 17:45:10 +01:00
Kim Kulling bb21ec9423
trigger build 2021-02-03 21:17:57 +01:00
Kim Kulling 2391432523 fix overflow 2021-02-03 21:07:28 +01:00
Kim Kulling e6b8ae44cb Fix unittests: skip newline at begin of matrix token. 2021-02-03 20:54:48 +01:00
Kim Kulling faf53b8e0f Fix broken autocorrect fix 2021-02-02 23:33:02 +01:00
Kim Kulling 6ee1a32fb2 fix compile issue: replace std::make_unique 2021-02-02 22:54:20 +01:00
Kim Kulling 50fd5127ef Some review findings. 2021-02-02 22:34:30 +01:00
Kim Kulling fa2354ebc3 Fix incorrect xml-parsing in collada importer. 2021-02-02 22:06:33 +01:00
contriteobserver 65bc86e181
Merge branch 'master' into ColladaAnimationFix 2021-02-01 16:58:01 -08:00
contriteobserver e33b69a428 Collada importer now identifies animations
addresses issue #3584
2021-01-28 13:06:02 -08:00
contriteobserver d7bf513250 renaming iterator to avoid any possibility of scop collisions 2021-01-26 01:36:12 -08:00
contriteobserver 69fc809307 size_t is not the same as unsigned int on some systems 2021-01-26 01:01:59 -08:00
contriteobserver f92a34e0b7 Merge branch 'master' into ColladaSubmeshFix 2021-01-26 00:38:37 -08:00
Kim Kulling 243d017463
Add missing skip
- closes https://github.com/assimp/assimp/issues/3601
- Fix some format issues
2021-01-24 18:47:50 +01:00
Kim Kulling a2b889ab09
Fix typo in collada parser
closes https://github.com/assimp/assimp/issues/3599
2021-01-24 18:21:46 +01:00
contriteobserver 338abded12 ColladaLoader now assigns individual materials to submeshes as needed
Optional assignment of individual materials to submeshes, addresses #3606
2021-01-23 02:20:58 -08:00
Biswapriyo Nath c65f2cb3fb Remove extra semicolon while GCC being pedantic. 2020-12-13 00:12:44 +05:30
Kim Kulling b842b4a3c1
Merge branch 'master' into fbxReportAssetIssuesProperly 2020-10-21 20:02:48 +02:00
Kim Kulling 69143ed149 fix unittests. 2020-10-19 23:53:27 +02:00
Kim Kulling 080322b9e2 cleanup collada xml migration. 2020-10-19 19:06:11 +02:00
Kim Kulling 857f62cde0 closes pParam.mReference = source; 2020-10-14 20:34:46 +02:00
Malcolm Tyrrell 20733537d7
Merge branch 'master' into fbxReportAssetIssuesProperly 2020-10-08 09:54:04 +01:00
Malcolm Tyrrell 6b9c477763 The floar parsing routines are now DeadlyErrors. 2020-10-02 13:58:55 +01:00
Kim Kulling c7f7ed8901
Update ColladaLoader.cpp 2020-09-30 20:51:54 +02:00
Kim Kulling 0191c661b5
fix division by zero. 2020-09-30 20:39:26 +02:00
Kim Kulling 1c85676a9c collada: fix warning: not inited variable. 2020-09-27 21:19:23 +02:00
Kim Kulling 052cc2e070 collada: fix warning: not inited variable. 2020-09-27 21:16:51 +02:00
Kim Kulling 5038f21d06 collada: fix warning: not inited variable. 2020-09-27 21:14:21 +02:00
Kim Kulling 202907d471 collada: fix warning: unused variable. 2020-09-27 21:11:42 +02:00
Kim Kulling 3f97a1df2c collada: fix warning: unused variable. 2020-09-27 21:09:06 +02:00
Kim Kulling bdd3c96eee amf: fix warning: unused variable. 2020-09-27 21:06:14 +02:00
Kim Kulling 5653a82a87 fix the unittests. 2020-09-27 20:20:44 +02:00
Kim Kulling d6892b3f58 Merge branch 'master' into pugi_xml 2020-09-25 21:00:09 +02:00
Kim Kulling 557273818d collada: next iteration. 2020-09-23 21:23:12 +02:00
Kim Kulling 34351b3cb9 fix collada material parsing. 2020-09-23 00:20:06 +02:00
kimkulling 71f20eaa8a next fixes 2020-09-22 15:51:21 +02:00
kimkulling dee8e5bee1 Merge branch 'pugi_xml' of https://github.com/assimp/assimp into pugi_xml 2020-09-22 15:20:35 +02:00
Kim Kulling c4039d5cf0 fix collada data parsing. 2020-09-21 20:05:16 +02:00
kimkulling 8c88526da8 fix collada unittests. 2020-09-21 16:39:24 +02:00
Fabian Schmidt 338c0b753c
Merge branch 'master' into collada_animation_ticks_per_sec_issue_3162 2020-09-16 21:43:35 +02:00
Kim Kulling 14d6141f69 Collada: fix scenenode parsing. 2020-09-14 21:35:36 +02:00
kimkulling d0932c405f fix duplicated node parsing. 2020-09-11 15:46:46 +02:00
Kim Kulling c1f50e116a fix next unittests. 2020-09-11 00:46:29 +02:00
Kim Kulling 689406fbda Fix Colladat import. 2020-09-04 07:33:10 +02:00
Kim Kulling be5089ae40 Collada: correct parsing of float data in xml nodes. 2020-09-02 22:38:19 +02:00
Kim Kulling 0b8ed5c03a fix crash when x3d is empty 2020-09-02 21:49:40 +02:00
Kim Kulling 73fa2cbe88 Fix memory handling of xml-nodes in the parser. 2020-09-01 21:48:50 +02:00
Kim Kulling 3c2133a3b9 fix node collection for collada xml parsing 2020-09-01 07:51:17 +02:00
kimkulling e62b4e5cce next iteration. 2020-08-31 16:10:38 +02:00
Kim Kulling 6d5c388780 Introduce node iterator. 2020-08-30 21:10:04 +02:00
kimkulling 30a4eae17f simplify some ttributes access in loaded xml. 2020-08-28 16:25:22 +02:00
kimkulling 0730eebe6f fix collada handling of xml nodes. 2020-08-28 16:17:56 +02:00
crocdialer 3c98197be0 set aiAnimation->mTicksPerSecond to 1000.0. this is analog to the behaviour of gltf2-importer 2020-08-28 16:09:15 +02:00
Kim Kulling b7e9595e54 fix loop of xml-files. 2020-08-28 00:09:51 +02:00
kimkulling 582a8b1887 Fix xml-migration bild. 2020-08-27 17:05:09 +02:00
Kim Kulling c359b973bb finish migration of collada. 2020-08-26 22:31:46 +02:00
Kim Kulling 904f17f29f next collada-iteration 2020-08-24 07:44:54 +02:00
Kim Kulling 7adfe1f2d8 Xml: introduce helper for attribute parsing. 2020-08-21 06:45:30 +02:00
Kim Kulling cb631517a7 next iteration. 2020-08-19 22:44:13 +02:00
kimkulling d393f677ce Collada: next methods migrated. 2020-08-19 17:10:30 +02:00
Malcolm Tyrrell b7c789da67 Stop concatenating std::strings. Use formatter. 2020-08-18 17:35:08 +01:00
Malcolm Tyrrell 0ffcdf160e Build formatting into DeadlyImportError 2020-08-18 16:32:34 +01:00
Kim Kulling 21678df589 ogre + collada migration. 2020-07-10 22:25:38 +02:00
Kim Kulling 77b705048b fix merge issues. 2020-07-04 13:42:23 +02:00
Kim Kulling b1369d0912 next steps. 2020-07-02 15:18:59 +02:00
Kim Kulling fb20e15163 start to migrate colladat and amf 2020-06-27 15:57:06 +02:00
Kim Kulling 6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
Kim Kulling 2be731d1bf Merge branch 'master' into pugi_xml 2020-05-22 10:09:46 +02:00
Kim Kulling ecfca1d5c5
Merge branch 'master' into verboseLogging 2020-05-21 18:30:52 +02:00
Kim Kulling cfbdacb02a
Merge branch 'master' into bug-3201-collada_root_meshes 2020-05-16 20:50:34 +02:00
Malcolm Tyrrell 434c5e3d37 More verbose logging 2020-05-15 17:29:49 +01:00
kimkulling 464d4cf99a Merge branch 'master' of https://github.com/inhosens/assimp into inhosens-master 2020-05-15 15:08:30 +02:00