Commit Graph

192 Commits (master)

Author SHA1 Message Date
Aaron Gokaslan 411171fa45 Apply some more modernize-use-emplace 2022-09-02 11:20:02 -04:00
Aaron Gokaslan 4c6652f5b0 Add a handful of missing fixes 2022-09-01 11:37:53 -04:00
Gargaj a22aa75bca
fix vertices being joined duplicating weights
This bug causes weights to duplicate, i.e. one bone will have several (equal) weights assigned to the same vertex - which then has the potential to cause even bigger problems when combined with `LimitBoneWeightsProcess`.
2022-08-31 22:27:34 +02:00
Kim Kulling f527e56f22
Merge branch 'master' into explicitly-default-dtors 2022-08-30 22:21:06 +02:00
J.G.Adams 9cd723e282
Wrong object is created here!
If I'm not mistaken. Because this is originally push_back(aniMeshVertex) instead of push_back(v).
And the fact that aniMeshVertex is just getting created and destroyed for nothing.
It need to be replaced with this then? A Clang-tidy syntax to create the same aniMeshVertex.

I found this in pull request #4527 I think it may need to be reviewed too.
2022-08-26 19:12:11 -04:00
Aaron Gokaslan e93fa6699a Manually fix up 100 more instances where it should be defaulted 2022-08-25 12:20:13 -04:00
Aaron Gokaslan 6fa21dcc6e Explicitly default all empty dtors 2022-08-25 11:32:59 -04:00
Aaron Gokaslan 27edb43600 Apply modernize-use-emplace clang-tidy rule 2022-08-23 11:41:49 -04:00
Gargaj bca5650578 fix windows 32 bit builds 2022-06-21 13:40:49 +02:00
Kim Kulling 58af6ba9db
Fix compier warning 2022-05-14 09:59:07 +02:00
Kim Kulling deb1698cbe
Fixed formattings. 2022-05-14 09:56:38 +02:00
motazmuhammad 78dbef8711
Merge branch 'master' into master 2022-05-13 20:15:55 +01:00
motazmuhammad 36d730fc4e add more comments 2022-05-13 20:10:19 +01:00
motazmuhammad 5d8b1649a4 Revert "use unordered_set to accelerate the vertix merging"
This reverts commit 0ffb91fbf1.
2022-05-13 19:59:16 +01:00
motazmuhammad 0ffb91fbf1 use unordered_set to accelerate the vertix merging 2022-05-13 18:14:49 +01:00
IOhannes m zmölnig 1d3d5c4bb6 Rename TextureTypeToString() to aiTextureTypeToString()
Closes: https://github.com/assimp/assimp/issues/4493
2022-05-01 13:27:42 +02:00
jaefunk e02d51ec24 add ifndef guard for resolve to fails to compile 2022-03-11 10:51:13 +09:00
youkeyao ad766cb738 update the calculation and orthogonalization for bitangent 2022-02-20 17:15:11 +08:00
Kim Kulling 76a7614c4b Adapt ai_epsilon to code 2022-02-16 20:07:27 +01:00
Kim Kulling 50c7301a38 Update copyrights 2022-01-10 21:13:43 +01:00
IOhannes m zmölnig 9a7ee0ac14 Throw a DeadlyImportError rather than an assertion if all materials are redundant and thus removed
Closes: https://github.com/assimp/assimp/issues/4224
Closes: https://github.com/assimp/assimp/issues/4225
2021-12-07 12:35:15 +01:00
freizhang 6e6807ee6c Verbose processor bone weight count fix 2021-11-13 11:56:15 +08:00
Kim Kulling 791cb195be
Merge branch 'master' into x3d_pugi_migration_artenuvielle 2021-10-20 21:14:43 +02:00
Kim Kulling a82dc887fc
Merge branch 'master' into x3d_pugi_migration_artenuvielle 2021-10-14 09:27:07 +02:00
IOhannes m zmölnig 3b8126d26a Fix spelling mistake 2021-10-08 08:48:01 +02:00
Davide Pizzolotto ae951fbef9
Fix aiString length in aiProcess_EmbedTextures 2021-10-03 00:41:09 +02:00
Artenuvielle c7e9c6580a
Merge branch 'master' into x3d_pugi_migration_artenuvielle 2021-09-12 11:45:00 +02:00
René Martin 3001d88172 Merge branch 'master' into x3d_pugi_migration 2021-09-07 15:04:08 +02:00
Kim Kulling 768024d5a0
Merge branch 'master' into master 2021-09-07 11:39:34 +02:00
Madrich 9b535d1c15 Fix Double Precision errors/warnings 2021-08-31 12:59:31 +02:00
Max Vollmer (Microsoft Havok) 51f294c587 Fixes issues our internal compliance and code quality tool found:
* Adds nullptr checks and asserts to protect certain code paths
* Fixes wrong integer type in a printf call
* Adds const to const values
* Prevents integer overflow with explicit casts
2021-08-30 14:59:17 +01: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
Aaron Gokaslan 94c3abd841 Apply various performance fixes from clang-tidy 2021-06-22 12:27:15 -04:00
Kim Kulling a34b9d1c95
Fix review findings 2021-06-16 11:21:31 +02:00
Hill Ma af748755e1 Fix issue #2873 2021-06-15 13:20:12 -07:00
Kim Kulling d33cf1dc0c
Merge branch 'master' into x3d_pugi_migration 2021-06-06 16:06: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 89584c167a Log debug 2021-05-13 09:56:42 +01:00
Malcolm Tyrrell ca698c3e49 Log error 2021-05-13 09:36:42 +01:00
Kim Kulling 25cf5dd487
Merge branch 'master' into mRootNode_mTransformation 2021-05-06 21:40:03 +02:00
Kim Kulling 350f2ea1d3 Fix build and merged master. 2021-05-06 21:36:25 +02:00
Kim Kulling 52228a93f8 Fix X3DGeohelper. 2021-05-06 21:07:38 +02:00
Kim Kulling e120544978
Merge branch 'master' into fixGenNormals 2021-05-06 17:28:37 +02:00
Kim Kulling 0b92abe9b4
Merge branch 'master' into empty-string-style 2021-04-30 00:54:57 +02:00
Garux 3717e66fae consider aiProcess_FlipWindingOrder in aiProcess_GenNormals & aiProcess_GenSmoothNormals 2021-04-29 20:52:06 +03:00
Garux ebf5ef9a4b consider pScene->mRootNode->mTransformation set by some importers while using AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION 2021-04-29 20:43:37 +03:00
Max Vollmer (Microsoft Havok) 44dc08f128 Remove GLTF tag, postprocessing is format independent 2021-04-21 16:20:58 +01: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 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
Clement JACOB e66232d8c3
Merge branch 'master' into feature/gltf_fb_ngon_encoding 2021-04-07 13:54:31 +02:00
Kim Kulling cdb6a62cdb
Merge branch 'master' into issue_3678 2021-04-03 10:27:07 +02:00
Kim Kulling da0543972b Fix parsing for AMF-Files. 2021-04-03 10:25:03 +02:00
Clement Jacob fc2c12ad6a Fixing encoding when lines and points are encountered 2021-03-30 09:58:28 +02:00
Clement Jacob fc0cf2ea8d NGON encoding triangles only 2021-03-30 09:19:50 +02:00
Clement Jacob 2e90fed527 Refactoring and fixing remaining issues in triangulation process 2021-03-30 09:10:50 +02:00
Clement Jacob 596001c89c Refactoring the extension 2021-03-30 09:10:50 +02:00
Clement Jacob 81019d5e58 Fixing quad encoding 2021-03-30 09:10:50 +02:00
Clement Jacob 6d1a0c6054 Adding quad proper handling 2021-03-30 09:10:50 +02:00
Clement Jacob 8e589221d7 [gltf2-exporter] Adding FB_ngon_encoding support 2021-03-30 09:10:50 +02:00
Kim Kulling f5ed217409
Merge branch 'master' into msvc2019fix 2021-03-12 15:49:41 +01:00
Kim Kulling 6c89631581 closes https://github.com/assimp/assimp/issues/3678: ensure lowercase 2021-03-09 21:08:28 +01:00
Andy Shaw 2576c8c3a6 Compile fix for MSVC 2019
Small is seen as a type with some options so this fixes the errors starting with:

code\PostProcessing\ComputeUVMappingProcess.cpp(125): error C2632: 'int' followed by 'char' is illegal
2021-03-04 08:04:19 +01:00
Kim Kulling c669c8f1eb
Merge branch 'master' into update_copyrights 2021-02-28 12:18:41 +01:00
Kim Kulling 9e8dbd0ca5 Update copyrights to 2021. 2021-02-28 12:17:54 +01:00
Kim Kulling aa6f983920
Remove buggy assert
- Remove assertion test for empty nodestacks when no meshes are in the node. Just return from the function.
- closes https://github.com/assimp/assimp/issues/3664
2021-02-25 14:01:18 +01:00
Bart Sekura 5f50e42535 added missing return 2021-01-23 09:56:35 +09:00
Bart Sekura f8c512acd7 changed morph anim error to warning when validating 2021-01-23 09:52:46 +09:00
Inho Lee 4e5b25cd81 Keep AnimMesh data during the SortByPTypeProcess
A Postprocessing step, SortByPTypeProcess, can rebuild Mesh data,
but it does not handle AnimMesh.
This patch helps to rebuild appropriate AnimMeshes for the Mesh.
2020-12-16 19:19:30 +01:00
Oleg Bogdanov 4d4a3c42f6 Fix for 3489 | Preserve morph targets when splitting by bone count 2020-11-28 10:01:50 -08:00
Malcolm Tyrrell d9b90f714a Fix typo 2020-11-16 11:06:39 +00:00
Kim Kulling 0d5e5790cb
Fix findings. 2020-11-14 12:44:49 +01:00
Malcolm Tyrrell 3deae8760c Optimize FindDegenerates so it doesn't explode 2020-11-02 14:43:35 +00:00
Malcolm Tyrrell b7c789da67 Stop concatenating std::strings. Use formatter. 2020-08-18 17:35:08 +01:00
Kim Kulling b94183376c
Fix possible overflow in new. 2020-08-05 17:56:44 +02:00
Malcolm Tyrrell 51150cb3df Ensure asserts are defined where expected. 2020-07-02 14:53:29 +01:00
Hill Ma 30f09e9fc0 Fix build when ASSIMP_DOUBLE_PRECISION is on.
Tested:
$ cmake -DASSIMP_DOUBLE_PRECISION=1 -DASSIMP_BUILD_MDL_IMPORTER=0 ..; make

The MDL importer is disabled due to the fact that there is some float-only code
in MDL. This also means bin/assimp and bin/unit would not link successfully with
the above build flags.
2020-06-28 17:36:21 -07:00
Kim Kulling ba6af9ff98
Merge branch 'master' into FindInvalidData 2020-06-25 16:41:24 +02:00
Kim Kulling 6205af4efb replace NULL and avoid ai_assert with more than 2 tests. 2020-06-23 21:05:42 +02:00
Ryan Styrczula 5717ea466f FindInvalidDataProcess: Mark removed meshes as "out"
There's a code path where an input scene only has a single mesh.
In this case, if ProcessMesh returns 2, we delete the mesh and move on
with the postprocessing. UpdateMeshReferences is not called and so the
deleted mesh is left dangling in nodes.

In a later step (SplitMesh in my testing), it then tries to deference a
null pointer and we explode.

With `out = true`, we can now hit the DeadlyImportError instead of a
segfault.
2020-06-22 17:24:16 -04:00
Kota Iguchi 6acaaee80f Check invalid vertex id for bone weight 2020-06-20 15:27:28 +09:00
Kim Kulling ecfca1d5c5
Merge branch 'master' into verboseLogging 2020-05-21 18:30:52 +02:00
Ryan Styrczula c4055d04b4 Fix double free caused in FindInvalidDataProcess
In debug builds, there's no issues, but in release, an invalid mesh that
is deleted in FindInvalidDataProcess will be double free'd when the
parent scene is destroyed.
2020-05-19 14:38:10 -04:00
Malcolm Tyrrell 87a7662bee More thinks using VERBOSE_DEBUG 2020-05-18 11:45:00 +01:00
Malcolm Tyrrell 90cdbd9d9a Fix ups 2020-05-15 17:46:50 +01:00
Malcolm Tyrrell e11d78596f Use verbose debug logging in certain places 2020-05-15 17:26:17 +01:00
Kim Kulling 89a865ce19
Merge branch 'master' into master 2020-05-06 22:07:39 +02:00
kkulling 4e16716924 Merge branch 'file-formatting' of https://github.com/aaronfranke/assimp into aaronfranke-file-formatting 2020-05-05 10:17:52 +02:00
Kim Kulling 638df2ceac
Merge branch 'master' into master 2020-04-25 12:07:06 +02:00
Kim Kulling c36b028412
fix type error for template deduction. 2020-04-21 16:39:18 +02:00
Alexey Medvedev 53990ffa42 Check for existed bone 2020-03-31 14:18:51 -07:00
Alexey Medvedev 3ef46b0edd Weights and bones count checks 2020-03-30 16:56:33 -07:00
Alexey Medvedev 5e93b9ea8b Fixed bone splitting with excessive amount of bones with 0 weight 2020-03-30 12:42:32 -07:00
napina bb4bcb442a Merge branch 'master' of https://github.com/assimp/assimp 2020-03-23 10:35:06 +02:00
napina f0243cc7f3 Changed AI_LMW_MAX_WEIGHTS*2 to 8 which is same thing. 2020-03-22 15:58:12 +02:00
napina d5d30c898b Optimized LimitBoneWeightsProcess. Added SmallVector to reduce heap allocations. Simplified algorithm and removed unnecessary copying. 2020-03-22 12:47:42 +02:00
Aaron Franke 1529f9518f
Make file formatting comply with POSIX and Unix standards
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 02:34:12 -04:00
Kim Kulling 856ca9f2dd Fix static-code findings, 2020-03-15 12:16:17 +01:00
Kim Kulling 976091a6f6 ix compiler warning for pragma statements. 2020-03-15 11:47:05 +01:00
Kim Kulling 4210318a34
Merge branch 'master' into enable_vs_warning_all 2020-03-15 10:19:49 +01:00