Commit Graph

48 Commits (4fce9c8f1eb274aa216ed550efd232c768af260e)

Author SHA1 Message Date
Martin Weber bb1873dd22 Collada: added import property to disable unit size scaling 2023-08-04 09:54:55 +02:00
Kim Kulling f830d7998e
Merge branch 'master' into clean-up-ctors-dtors 2023-01-23 21:21:34 +01: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 3d3e856925 Trim Trailing Whitespace 2023-01-16 09:12:35 +01:00
Aaron Gokaslan ccfb175460 Apply various clang-tidy checks for smartprs and modern C++ types 2022-11-08 11:03:55 -05:00
Aaron Gokaslan e93fa6699a Manually fix up 100 more instances where it should be defaulted 2022-08-25 12:20:13 -04:00
Onur Berk Tore 4f06c41802
Fix: Collada header updated 2022-06-21 21:08:11 +03:00
Onur Berk Tore c2060a1f7e
Deletion: Removed unnessary header 2022-06-20 23:48:00 +03:00
Onur Berk Tore 1b53f41787
Feature: Utilizes removeEmptyBones flag for Collada 2022-06-20 23:46:29 +03:00
Kim Kulling 76a7614c4b Adapt ai_epsilon to code 2022-02-16 20:07:27 +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
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
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 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 b7f88f3063 closes https://github.com/assimp/assimp/issues/3957: checkj for empty positions. 2021-07-26 10:51:16 +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
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 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Gargaj 8ae8b165ca
fix compile warning-turned-error on x86 2021-02-08 00:37:06 +01:00
Kim Kulling 2391432523 fix overflow 2021-02-03 21:07:28 +01:00
Kim Kulling faf53b8e0f Fix broken autocorrect fix 2021-02-02 23:33:02 +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 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 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
Kim Kulling 080322b9e2 cleanup collada xml migration. 2020-10-19 19:06:11 +02: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 d6892b3f58 Merge branch 'master' into pugi_xml 2020-09-25 21:00:09 +02:00
Kim Kulling 34351b3cb9 fix collada material parsing. 2020-09-23 00:20:06 +02:00
Fabian Schmidt 338c0b753c
Merge branch 'master' into collada_animation_ticks_per_sec_issue_3162 2020-09-16 21:43:35 +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
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 6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
kimkulling 464d4cf99a Merge branch 'master' of https://github.com/inhosens/assimp into inhosens-master 2020-05-15 15:08:30 +02:00
RichardTea ea917bd4ae Move Collada into AssetLib folder
Should make the merge easier
2020-05-04 13:54:49 +01:00