Commit Graph

12494 Commits (104a70f8453bcac885c835f5c747762ca75949eb)

Author SHA1 Message Date
Kim Kulling ab0a119626
Update LimitBoneWeightsProcess.cpp
- Removing empty bones only if AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES is enabled.
- closes https://github.com/assimp/assimp/issues/4840
2023-01-20 19:14:04 +01:00
lsnoel 8d1256f472 Comments about winding order fix for gen normals 2023-01-20 14:55:06 +00:00
Kim Kulling d331a7e5d4
Merge branch 'master' into fix-build-without-armaturepopulate-post-process 2023-01-20 13:52:13 +01:00
lsnoel eb5d3c51e8 Correctly consider aiProcess_FlipWindingOrder AND aiProcess_MakeLeftHanded when generating normals 2023-01-19 16:46:29 +00:00
Krishty 72f360710a Fix MSVC Warnings With “emplace_back()”
Several places in the code call `std::vector<aiVector3D>.emplace_back(0, 0, 0)`. The constructor of `aiVector3D` actually expects arguments of the type `ai_real`, (alias of `float` if compiling without `ASSIMP_DOUBLE_PRECISION`) but the literal `0` is of type `int`.

`emplace_back()` does support promotion, but `int` to `float` is a potentially lossy conversion. tl;dr: On warning level 4, MSVC spits out a very deeply nested `warning C4244: 'argument': conversion from '_Ty' to 'TReal', possible loss of data with _Ty=int and TReal=ai_real`.
2023-01-18 00:08:38 +01:00
shimaowo 20acfeaf97
Merge branch 'master' into fix_gltf2_camera_fov 2023-01-17 14:39:54 -08:00
Kim Kulling 67eae8ee5a
Merge pull request #4878 from MMory/f-FixWhitespaceBetweenTagAndNum
Fix #4877
2023-01-17 20:04:47 +01:00
shimaowo b298b79a46 add missing parens 2023-01-17 10:53:41 -08:00
Martin Mory 7f6e96747b
Merge branch 'master' into f-FixWhitespaceBetweenTagAndNum 2023-01-17 13:32:39 +01:00
Kim Kulling d640a89035
Merge pull request #4879 from krishty/fix-build-with-m3d-import-only
Fix #4262 Build With M3D Import Only
2023-01-17 12:14:23 +01:00
Martin Mory a89d5c7cea
Merge branch 'master' into f-FixWhitespaceBetweenTagAndNum 2023-01-17 12:10:46 +01:00
Kim Kulling e9f95e5ab6
Merge branch 'master' into fix-build-with-m3d-import-only 2023-01-17 11:22:00 +01:00
Kim Kulling 6a8f169103
Merge pull request #4872 from drbct/fixJoinVerticesProcess
Generalize JoinVerticesProcess for multiple UV and color channels
2023-01-17 11:05:57 +01:00
Kim Kulling 19dec716d3
Merge branch 'master' into fixJoinVerticesProcess 2023-01-17 09:11:43 +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 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 793284a766 Fix Build Without ArmaturePopulate Post Process Step
This post process step introduced new attributes into `aiSkeletonBone`. Said attributes are only defined with the process enabled, i.e. when the `ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS` macro has not been defined.

Some code, however, accessed the variables unconditionally, leading to build failures if `ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS` was defined.

This commit adds the missing checks.
2023-01-16 08:42:50 +01:00
Krishty 5cbc00a595 Fix Build With M3D Import Only
`M3DWrapper.h` is designed to omit the definition of `class M3DWrapper` if neither M3D import nor M3D export are compiled.
608bccd9cf touched the corresponding preprocessor checks and introduced a bug:
```
#ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
#if !(ASSIMP_BUILD_NO_EXPORT || ASSIMP_BUILD_NO_M3D_EXPORTER)
class M3DWrapper {
```
When compiling
- with M3D import enabled,
- but with either export generally disabled or M3D export disabled specifically,
These checks evaluate to the wrong result and skip the definition, leading to a build failure in dependent code.
```
#if 1 // import enabled
#if !(1 || 1) // export disabled and M3D export disabled
```
This commit fixes the check to compile the definition if neither import is disabled.
2023-01-16 08:29:49 +01:00
Krishty bad76fd0f1 Replace Variables With Literals 2023-01-16 08:18:36 +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
Martin Mory 43c0f8bb3d Remove whitespace between a <v> tag and the first number, otherwise first call to strtoul10() returns 0 and the indices are broken, leading to possible out-of-bound access and memory corruption/crash 2023-01-15 23:03:41 +01:00
Kim Kulling 70edec0efb
Merge pull request #4876 from assimp/kimkulling/remove_deprecated_comment_issue-4869
Remove deprecated comment
2023-01-15 20:42:31 +01:00
Kim Kulling 2d37f49f51
Remove deprecated comment
- closes https://github.com/assimp/assimp/issues/4869
2023-01-15 19:12:24 +01:00
Kim Kulling eb328ce69d
Merge pull request #4873 from tellypresence/improve-mMethod-typing
Change mMethod type to enum aiMorphingMethod
2023-01-13 10:31:45 +01:00
Steve M b2672c082d Change mMethod type to enum aiMorphingMethod
Address sanitizer warning
2023-01-12 12:35:28 -08:00
Daniel Rösner 74af523b3e Generalize JoinVerticesProcess for multiple UV and color channels 2023-01-12 13:13:46 +01:00
Kim Kulling 33c32b6b35
Merge pull request #4855 from asmaloney/spelling
Fix several spelling mistakes
2023-01-08 21:00:39 +01:00
Kim Kulling b393132b58
Merge branch 'master' into spelling 2023-01-08 17:43:55 +01:00
Kim Kulling 9ace81a3d2
Merge pull request #4863 from assimp/kimkulling/update_readme
Update the getting help section
2023-01-05 12:56:17 +01:00
Kim Kulling f6457e1c87
Update Readme.md 2023-01-05 11:34:12 +01:00
Kim Kulling fa7d3aa0c0
Update the getting help section 2023-01-05 11:32:01 +01:00
Kim Kulling 2af29f4836
Merge pull request #4861 from assimp/kimkulling/LWOAnimation_fix_division_by_zero_issue-4860
Fix: Fix possible division by zero
2023-01-04 09:37:41 +01:00
Kim Kulling 96b071bdb1
Fix: Fix possible division by zero
- closes https://github.com/assimp/assimp/issues/4860
2023-01-04 09:19:37 +01:00
Kim Kulling 767644cd3f
Merge pull request #4859 from assimp/kimkulling/fix_signed_unsigned_mismatch_warning-issue-4854
Fix: Fix signed unsigned mismatch
2023-01-03 21:24:17 +01:00
Kim Kulling df8a9bb2b8
Fix: Fix signed unsigned mismatch
- closes https://github.com/assimp/assimp/issues/4854
2023-01-03 21:11:09 +01:00
Kim Kulling 35162c19b2
Merge branch 'master' into spelling 2023-01-03 20:32:41 +01:00
Kim Kulling 8c57382b20
Merge pull request #4858 from asmaloney/cmake-remove-dead-code
{cmake} Remove dead code
2023-01-03 19:30:12 +01:00
Andy Maloney 465566a87e {cmake} Remove dead code
BUILD_LIB_TYPE isn't used anywhere.

I think the intent with "add_definitions" here was to affect cmake (?), but it's actually just adding "#define DDL_STATIC_LIBRARY OFF" which isn't used in the code anywhere.
2023-01-03 05:04:25 -05:00
Andy Maloney e893248e7c Fix several spelling mistakes & a comment 2023-01-01 13:31:48 -05:00
Kim Kulling 05279f8bbd
Merge pull request #4852 from sfjohnston/sfjohnston_mods
sprintf to snprintf with known MAXLEN for buffer.
2022-12-31 15:29:24 +01:00
sfjohnston 25f0146f44 sprintf to snprintf with known MAXLEN for buffer. 2022-12-28 12:32:11 -08:00
Kim Kulling 7eadcebc9f
Merge pull request #4850 from assimp/kimkulling/move_asserthandler_to_include_issue-4779
Refactoring: Move asserthandler header to include
2022-12-23 16:57:37 +01:00
Kim Kulling ef5dd8c451
Merge branch 'master' into kimkulling/move_asserthandler_to_include_issue-4779 2022-12-23 16:29:30 +01:00
Kim Kulling a8e50be781 Refactoring: Move asserthandler header to include 2022-12-23 16:19:39 +01:00
Kim Kulling 883667c61a
Merge pull request #4848 from assimp/kimkulling/unzip_fix_compiler_warning
Update unzip.c
2022-12-23 14:07:04 +01:00
Kim Kulling 89b5011759
Update unzip.c
- Fix compiler warning.
2022-12-23 13:50:16 +01:00
Kim Kulling 022c385571
Merge pull request #4846 from rohit-kumar-j/patch-1
illegal token on right-side-of ::Windows
2022-12-19 09:49:20 +01:00
Kim Kulling 76de8ba1f4
Update material.inl 2022-12-19 08:58:45 +01:00