Commit Graph

39 Commits (e3001f1eb792279a32fef374dfa9ed9b6f355b1f)

Author SHA1 Message Date
Kim Kulling acd70b35a0 Fix merge issues 2022-01-16 20:57:56 +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
IOhannes m zmölnig 3b8126d26a Fix spelling mistake 2021-10-08 08:48:01 +02:00
krishty 8c84afaff0
Merge branch 'master' into const-tokens 2021-09-15 23:31:00 +02:00
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
Aaron Gokaslan 94c3abd841 Apply various performance fixes from clang-tidy 2021-06-22 12:27:15 -04:00
Kim Kulling b59db55b8c
Merge branch 'master' into less-string-bloat 2021-05-26 12:14:08 +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
Malcolm Tyrrell 813d0aecdd Adjust warn 2021-05-12 12:43:24 +01:00
Krishty 0f3e6e2941 replaced std::size() with AI_COUNT_OF for pre-C++20 compilers 2021-05-05 00:08:54 +02:00
Krishty 2a126f9f62 reduced Ogre string bloat
The Ogre importer used std::string where a string literal would have been sufficient. Saves another 600 B of code and data.
2021-05-04 22:01:00 +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 55dd5faafb fixed export exceptions on import
Ogre and 3MF imports threw DeadlyExportErrors under some circumstances. Bad for people who assumed that they only needed to catch DeadlyImportErrors. Changed them to DeadlyImportErrors.
2021-04-19 19:33:41 +02:00
Kim Kulling da0543972b Fix parsing for AMF-Files. 2021-04-03 10:25:03 +02:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Kim Kulling 89ac168014 ogre: fix warning: not inited variable. 2020-09-27 21:23:55 +02:00
Kim Kulling 9234fee35e Ogre: fix xml migration. 2020-09-27 09:36:38 +02:00
Kim Kulling d6892b3f58 Merge branch 'master' into pugi_xml 2020-09-25 21:00:09 +02:00
Kim Kulling c1f50e116a fix next unittests. 2020-09-11 00:46:29 +02:00
Kim Kulling 73fa2cbe88 Fix memory handling of xml-nodes in the parser. 2020-09-01 21:48:50 +02:00
kimkulling 582a8b1887 Fix xml-migration bild. 2020-08-27 17:05:09 +02:00
kimkulling d393f677ce Collada: next methods migrated. 2020-08-19 17:10:30 +02:00
Kim Kulling 56381241c5 move hasAttribute to XmlParser scope. 2020-08-19 00:19:56 +02: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
Malcolm Tyrrell 0ffcdf160e Build formatting into DeadlyImportError 2020-08-18 16:32:34 +01:00
Kim Kulling deddaf49df finish migrate ogrexmlserializer. 2020-07-16 11:33:28 +02:00
Kim Kulling 8cfd2a4cc1 Migrate OgreSerializer. 2020-07-14 09:00:06 +02:00
Kim Kulling 21678df589 ogre + collada migration. 2020-07-10 22:25:38 +02:00
Kim Kulling b1369d0912 next steps. 2020-07-02 15:18:59 +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
Malcolm Tyrrell 87a7662bee More thinks using VERBOSE_DEBUG 2020-05-18 11:45:00 +01:00
Malcolm Tyrrell 434c5e3d37 More verbose logging 2020-05-15 17:29:49 +01:00
Kim Kulling f8e6512a63 Move format importer and exporter into its won folder. 2020-05-02 15:14:38 +02:00