Commit Graph

4888 Commits (fix_include)

Author SHA1 Message Date
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
Yingying Wang c10e409a5d merge 2020-05-18 12:16:45 -07:00
Yingying Wang 193deb3441 cleanup 2020-05-18 12:01:09 -07:00
Yingying Wang e39c632809 cleanup 2020-05-18 11:50:51 -07:00
Yingying Wang 0897c4c7be merge 2020-05-18 11:31:44 -07:00
Yingying Wang 02cbd36271 pull master 2020-05-18 11:15:18 -07:00
Kevin Shepherd e9a3cc2c8a
Fixed rotation order bug in BVH Loader
This bug has been present since after the 4.10 release.
It fixes the issue "play the bvh error" #2187
Almost all bvh files are affected, such as any of the CMU library.
The bug is caused by the introduction of channelMap in the BVHLoader.cpp - function void BVHLoader::CreateAnimation(aiScene *pScene).  The channelMap loses the rotation order present oin the BVH file, and always applies the rotations in X,Y,Z order.
2020-05-18 16:07:46 +01:00
Malcolm Tyrrell 14692368d5 Same for LogDebug -> LogVerboseDebug 2020-05-18 11:55:14 +01:00
Malcolm Tyrrell 87a7662bee More thinks using VERBOSE_DEBUG 2020-05-18 11:45:00 +01:00
Kim Kulling 2438e1b52e
Merge branch 'master' into gltf2_fix_skin_recursion 2020-05-18 09:05:28 +02:00
Kim Kulling 4b0a3305b1
Merge branch 'master' into master 2020-05-17 13:54:10 +02:00
Kim Kulling 4f24b3dac2 Merge branch 'added_check_before_using' of https://github.com/qarmin/assimp into qarmin-added_check_before_using 2020-05-17 11:48:24 +02:00
Kim Kulling cfbdacb02a
Merge branch 'master' into bug-3201-collada_root_meshes 2020-05-16 20:50:34 +02:00
Yingying Wang b8e39b58d1 clean up 2020-05-15 12:32:58 -07:00
Yingying Wang f6720271cb sparce accessor exporter 2020-05-15 12:20:31 -07:00
Malcolm Tyrrell d70685d37f Fix typo 2020-05-15 17:50:48 +01:00
Malcolm Tyrrell 90cdbd9d9a Fix ups 2020-05-15 17:46:50 +01:00
Malcolm Tyrrell 434c5e3d37 More verbose logging 2020-05-15 17:29:49 +01:00
Malcolm Tyrrell e11d78596f Use verbose debug logging in certain places 2020-05-15 17:26:17 +01:00
Malcolm Tyrrell 5e0136d737 Add concept of verboseDebug 2020-05-15 17:23:07 +01:00
Malcolm Tyrrell 2ffd1cb8db nits 2020-05-15 17:22:15 +01:00
Malcolm Tyrrell bcca3a0d79 No need for bespoke macros 2020-05-15 17:22:02 +01:00
Malcolm Tyrrell 6be0ce1ec9 Initial pass at adding logging 2020-05-15 17:21:45 +01:00
Matias Kangasjärvelä 7a16a7a7e4 Fix infinite recursion in gltf2 skin parsing
Previously parsing a node caused the skin that was attached to it
to be parsed, which caused the skins node joints to be parsed,
which could cause the skin to be re-parsed leading to infinite or
at the very least exponential recursion.

The fix is to just get a reference to a temporarily uninitialized
skin as they were being parsed after the scene graph just to be safe
anyway. This way we avoid the recursion problem and all the references
will be valid in the end.
2020-05-15 16:48:41 +03:00
kimkulling 464d4cf99a Merge branch 'master' of https://github.com/inhosens/assimp into inhosens-master 2020-05-15 15:08:30 +02:00
kimkulling 246ec2b0dc Merge branch 'migenius-fix-ortho' of https://github.com/migenius/assimp into migenius-migenius-fix-ortho 2020-05-15 13:37:03 +02:00
kimkulling a6b5abd698 Merge branch 'master' of https://github.com/zyndor/assimp into zyndor-master 2020-05-15 08:51:46 +02:00
Kim Kulling 2571b47a28
Merge branch 'master' into bug-3177-dae-geo-id 2020-05-13 20:24:53 +02:00
Yingying Wang e9b67cdb89 gltf2 import sparse accessor 2020-05-11 14:34:35 -07:00
Jeremy Cytryn c3a21666da Make gltf2 export normal normalization safe
This avoids introducing NaNs e.g. when the input mesh has 0-length normals
2020-05-11 12:02:38 -07:00
Jeremy Cytryn c5a9fbd47f Gracefully handle NaNs and Infs in gltf2 accessor bound computation 2020-05-11 12:02:38 -07:00
Jeremy Cytryn aef4ecada5 Fail gltf/gltf2 export whenever invalid / incomplete JSON is generated
This can happen currently for example if NaNs are introduced in accessor bounds as rapidjson cannot write NaN/inf floats (see subsequent commit for fix there) and will halt writing to buffer at this point.  Fix here ensures that whenever anything like this happens we throw an exception so this ends up as a registered export failure case, rather than silently exporting the incomplete JSON
2020-05-11 12:02:38 -07:00
hoshiryu 3fdcd0861f Fix fbx rotation ; 2020-05-11 10:28:05 +02:00
kimkulling a1bcca2c99 remove step prototype: does not work this way. 2020-05-07 14:00:40 +02:00
Kim Kulling 89a865ce19
Merge branch 'master' into master 2020-05-06 22:07:39 +02:00
Sercan Degirmenci 201347700f fix incorrect header path on framework build 2020-05-06 16:15:23 +03:00
Yingying Wang 60e8146b9f fix wrong target idx when importing 2020-05-05 12:51:40 -07:00
RichardTea 56a4e61533 Collada: Don't copy the scene when exporting
This was purely to add a virtual top-level node
Use a flag instead.
Also add more const
2020-05-05 10:16:13 +01:00
RichardTea 6e447b2c44 Merge branch 'bug-3177-dae-geo-id' into bug-3201-collada_root_meshes 2020-05-05 09:52:08 +01:00
RichardTea d1ae6ac77a Fix typo in <visual_scene>
Swapped Id and Name
2020-05-05 09:51:41 +01:00
RichardTea fa1d2f09db
Merge branch 'master' into bug-3177-dae-geo-id 2020-05-05 09:33:48 +01:00
Kim Kulling ddee1b1ddb
Merge branch 'master' into aaronfranke-file-formatting 2020-05-05 10:21:46 +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 bf95d1da7c
fix conversion 2020-05-04 21:48:46 +02:00
RichardTea 8e73984a11 Collada Root Nodes aren't allowed to have meshes
Create a null parent node instead
2020-05-04 17:47:09 +01:00
RichardTea 6e200cb0d3 Merge branch 'master' into bug-3177-dae-geo-id
Impossible merge, have discarded upstream
2020-05-04 13:59:09 +01:00
RichardTea ea917bd4ae Move Collada into AssetLib folder
Should make the merge easier
2020-05-04 13:54:49 +01:00
Kim Kulling 91fa9a102b closes https://github.com/assimp/assimp/issues/3181: fix typo for light type. 2020-05-03 12:17:32 +02:00
Kim Kulling 3b06f57150 add missing inclde + 2020-05-02 21:11:47 +02:00
Kim Kulling 514593548d add assert-test for nullptr. 2020-05-02 21:07:41 +02:00
Kim Kulling 3329e76263 closes https://github.com/assimp/assimp/issues/3178: throw exception in case of invalid export stream. 2020-05-02 21:06:55 +02:00
Kim Kulling f8e6512a63 Move format importer and exporter into its won folder. 2020-05-02 15:14:38 +02:00
RichardTea 1dabb1a094 Collada: Fix crash with AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES
Add unit test for this
2020-05-01 14:59:09 +01:00
RichardTea 3e2dd186d1
Merge branch 'master' into bug-3177-dae-geo-id 2020-05-01 12:08:12 +01:00
RichardTea 5b9f207f1f ColladaExporter cleanup
Namespace, NULL and includes
2020-05-01 11:54:34 +01:00
RichardTea ee16d2c4c9 Fix camera, light and bone unique ids
Bones don't have a unit test yet
2020-05-01 11:13:38 +01:00
RichardTea 083ebdbc2e Collada Export: More unique Ids
Nodes, Materials, Animations, Lights, Cameras, Bones
2020-04-30 18:28:06 +01:00
Kim Kulling 2d9d112015 fix warning 2020-04-29 21:35:42 +02:00
Kim Kulling 1c30b7bf8e tryout: check if leak is coupled to type double. 2020-04-29 21:31:01 +02:00
Kim Kulling e0bc0f7fad try to fix double memleak. 2020-04-29 21:19:15 +02:00
Kim Kulling da2bf5c7a4 fix wrong size 2020-04-29 21:13:46 +02:00
Kim Kulling f808ed9fb5 fbxconverter: fix memoryleak. 2020-04-29 20:52:49 +02:00
Kim Kulling c6131ce38a scenecombiner: fix leak. 2020-04-29 20:43:23 +02:00
RichardTea ff9f3b8608 Collada: Ensure <geometry> has unique id
Use the "id" for mesh names by default.
Set option AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES to use the mesh "name" instead
2020-04-29 17:17:46 +01:00
RichardTea 2c6ac23a4e Apply Assimp clangformat to touched Collada files 2020-04-29 14:21:17 +01:00
Rafał Mikrut 6967a02fcb
Merge branch 'master' into added_check_before_using 2020-04-28 18:33:29 +00:00
qarmin 4dfdbbf171 Check index before using 2020-04-28 20:31:59 +02:00
Kim Kulling efa046366e
Retrigger build 2020-04-28 09:14:53 +02:00
luca 4488e3e745 build on Linux with gcc and clang; warning as error only for 'assimp' target 2020-04-27 23:38:33 -07:00
Paul Arden 81abd90ee1 Fix reading of orthographic camera data. Fixes #3028. 2020-04-28 10:07:56 +10:00
Kim Kulling b0c9711894
Small format finding 2020-04-27 15:16:57 +02:00
Inho Lee 629320a3a0 Add timescale for collada 2020-04-27 11:52:04 +02:00
luca d98787f35b CI: use clang on Unix, msvc on Windows;Remove explicit flags in CMakeLists.txt; 2020-04-26 12:50:42 -07:00
Kim Kulling 6c1e21d754 fix formatting. 2020-04-26 19:14:30 +02:00
Kim Kulling bafb8e3189 closes https://github.com/assimp/assimp/issues/3165: remove deprecated code whch causes compiler warning. 2020-04-26 08:59:52 +02:00
Kim Kulling 638df2ceac
Merge branch 'master' into master 2020-04-25 12:07:06 +02:00
Kim Kulling 9b1759dcc2
Merge branch 'master' into migenius-migenius-rsws53-mig-2 2020-04-22 19:59:53 +02:00
Kim Kulling ca70b44e44 Merge branch 'migenius-rsws53-mig-2' of https://github.com/migenius/assimp into migenius-migenius-rsws53-mig-2 2020-04-22 19:58:41 +02:00
Kim Kulling c36b028412
fix type error for template deduction. 2020-04-21 16:39:18 +02:00
Kim Kulling c91d3764ca
Merge branch 'master' into optimized_bonelimits 2020-04-21 08:45:50 +02:00
Kim Kulling f71b332ed1
Update glTF2Asset.inl
fix VS-compiler warning.
2020-04-19 21:14:47 +02:00
Kim Kulling e3563212d7
Merge branch 'master' into master 2020-04-19 21:13:12 +02:00
Kim Kulling e0f6eb09e6
Merge branch 'master' into optimized_bonelimits 2020-04-17 20:37:28 +02:00
Hehongyuanlove 9c52fd7633
Update D3MFExporter.cpp 2020-04-17 12:58:41 +08:00
Hehongyuanlove e9a72a5053
repair formate 3MF 2020-04-17 12:38:07 +08:00
Hehongyuanlove 3bbc8e76bd
Rgba2Hex to repair rgba(1,1,1,1) 2020-04-17 12:34:05 +08:00
Kim Kulling c0dc26de8e
Merge branch 'master' into GLTF2_recursive_references_fix 2020-04-16 11:29:37 +02:00
Kim Kulling 996abd3fbe
Merge branch 'master' into GLTF2_invalid_buffer_fix 2020-04-16 11:08:29 +02:00
Kim Kulling d12e938a70
Merge branch 'master' into ifdef_export_defines 2020-04-16 10:24:23 +02:00
Kim Kulling e341eadfd9
Fix typo 2020-04-16 10:23:50 +02:00
Timur Umayev 69f8d47941 glTF2 support targetNames 2020-04-15 09:39:46 +01:00
György Straub e4ceccb42d
Merge branch 'master' into master 2020-04-12 15:58:25 +01:00
Max Vollmer (Microsoft Havok) a14b5fb06f
Merge branch 'master' into GLTF2_invalid_buffer_fix 2020-04-10 08:44:19 +01:00
Max Vollmer (Microsoft Havok) 485d7ab52e
Merge branch 'master' into GLTF2_recursive_references_fix 2020-04-10 08:44:18 +01:00
Kim Kulling 79af2b1a5c
Merge branch 'master' into kimkulling_dev 2020-04-09 19:55:45 +02:00
György Straub 755f3748f1
Merge branch 'master' into master 2020-04-07 11:46:14 +01:00
Kim Kulling 9a11d91cb8 code reformattings. 2020-04-06 13:33:03 +02:00
Kim Kulling 131aed73b0 closes https://github.com/assimp/assimp/issues/2166: add missing setter for metadata. 2020-04-06 11:16:16 +02:00
Kim Kulling 132ecae6f4
Merge branch 'master' into kimkulling_dev 2020-04-04 18:28:50 +02:00
György Straub 956c57f18e
Merge branch 'master' into master 2020-04-03 13:42:59 +01:00
Max Vollmer (Microsoft Havok) a07bf8b26f
Merge branch 'master' into GLTF2_recursive_references_fix 2020-04-03 08:40:32 +01:00
Max Vollmer (Microsoft Havok) d966f3394b
Merge branch 'master' into GLTF2_invalid_buffer_fix 2020-04-03 08:40:29 +01:00
Kim Kulling c21a1ffffa
Remove comments to increase readability 2020-04-01 11:16:39 +02:00
Kim Kulling a7208b02e0
Merge branch 'master' into assimp_gltf2_exporter 2020-04-01 08:42:48 +02:00
Alexey Medvedev 53990ffa42 Check for existed bone 2020-03-31 14:18:51 -07:00
György Straub 87e2d3a54d Added support for glTF2 sparse accessors.
Refactored Accessors, pulling out reusable bits between those
and sparse accessors' indices / values.
2020-03-31 11:28:26 +01:00
Max Vollmer (Microsoft Havok) 54419eb9a0
Merge branch 'master' into GLTF2_invalid_buffer_fix 2020-03-31 09:54:12 +01:00
Max Vollmer (Microsoft Havok) 806d81c919
Merge branch 'master' into GLTF2_recursive_references_fix 2020-03-31 09:54:01 +01: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
Kim Kulling 6973aea6da fix compiler warnings. 2020-03-30 20:41:39 +02:00
Kim Kulling 4c177ad72e fix possible warnings 2020-03-30 20:33:43 +02:00
Kim Kulling d51b89f3ce
trigger build 2020-03-29 13:44:14 +02:00
Kim Kulling b1165cff28
Merge branch 'master' into kimkulling_dev 2020-03-29 12:07:20 +02:00
Ville Ruusutie 222b145307
Merge branch 'master' into optimized_bonelimits 2020-03-29 12:54:07 +03:00
Kim Kulling 9b83d74830 apply code-conventions to unrealloader 2020-03-28 09:48:55 +01:00
Kim Kulling 27e1a20efe
Update 3DSConverter.cpp
Trigger build.
2020-03-27 20:46:32 +01:00
Kim Kulling 3a206a424d
Merge branch 'master' into kimkulling_dev 2020-03-27 18:25:13 +01:00
Kim Kulling e543a58dfb
Update m3d.h
fix more alignment errors.
2020-03-27 18:23:22 +01:00
Kim Kulling 2cfdbe2d50
Update m3d.h
Fix alignment bug.
2020-03-27 16:27:07 +01:00
Kim Kulling 7a01061c3e
Update m3d.h
Try to fix build error.
2020-03-27 15:39:49 +01:00
Kim Kulling 60750161d5
Update m3d.h
replace assignment by memcpy.
2020-03-27 15:28:32 +01:00
Ville Ruusutie 855452831c
Merge branch 'master' into fbx_rotation_fix 2020-03-27 14:36:00 +02:00
Kim Kulling 32c59643f2
Update m3d.h
fix alignment issue.
2020-03-27 11:38:38 +01:00
Kim Kulling 80323b57bc
Update UnrealLoader.cpp
Fix static code analysis findings.
2020-03-27 11:30:40 +01:00
Ville Ruusutie 7a2bc5f8f3
Merge branch 'master' into optimized_bonelimits 2020-03-27 07:12:25 +02:00
Ville Ruusutie 69176ad425
Merge branch 'master' into optimized_bonelimits 2020-03-26 21:28:47 +02:00
Ville Ruusutie 7f521b4eb4
Merge branch 'master' into fbx_rotation_fix 2020-03-26 21:28:03 +02:00
Marc-Antoine Lortie 609632c6a5 Added missing functionalities to C API.
The C API functions that have been added are the following:

Vector2:
- aiVector2AreEqual
- aiVector2AreEqualEpsilon
- aiVector2Add
- aiVector2Subtract
- aiVector2Scale
- aiVector2SymMul
- aiVector2DivideByScalar
- aiVector2DivideByVector
- aiVector2Length
- aiVector2SquareLength
- aiVector2Negate
- aiVector2DotProduct
- aiVector2Normalize

Vector3:
- aiVector3AreEqual
- aiVector3AreEqualEpsilon
- aiVector3LessThan
- aiVector3Add
- aiVector3Subtract
- aiVector3Scale
- aiVector3SymMul
- aiVector3DivideByScalar
- aiVector3DivideByVector
- aiVector3Length
- aiVector3SquareLength
- aiVector3Negate
- aiVector3DotProduct
- aiVector3CrossProduct
- aiVector3Normalize
- aiVector3NormalizeSafe
- aiVector3RotateByQuaternion

Matrix3x3:
- aiMatrix3FromMatrix4
- aiMatrix3FromQuaternion
- aiMatrix3AreEqual
- aiMatrix3AreEqualEpsilon
- aiMatrix3Inverse
- aiMatrix3Determinant
- aiMatrix3RotationZ
- aiMatrix3FromRotationAroundAxis
- aiMatrix3Translation
- aiMatrix3FromTo

Matrix4x4:
- aiMatrix4FromMatrix3
- aiMatrix4FromScalingQuaternionPosition
- aiMatrix4Add
- aiMatrix4AreEqual
- aiMatrix4AreEqualEpsilon
- aiMatrix4Inverse
- aiMatrix4Determinant
- aiMatrix4IsIdentity
- aiMatrix4DecomposeIntoScalingEulerAnglesPosition
- aiMatrix4DecomposeIntoScalingAxisAnglePosition
- aiMatrix4DecomposeNoScaling
- aiMatrix4FromEulerAngles
- aiMatrix4RotationX
- aiMatrix4RotationY
- aiMatrix4RotationZ
- aiMatrix4FromRotationAroundAxis
- aiMatrix4Translation
- aiMatrix4Scaling
- aiMatrix4FromTo

Quaternion:
- aiQuaternionFromEulerAngles
- aiQuaternionFromAxisAngle
- aiQuaternionFromNormalizedQuaternion
- aiQuaternionAreEqual
- aiQuaternionAreEqualEpsilon
- aiQuaternionNormalize
- aiQuaternionConjugate
- aiQuaternionMultiply
- aiQuaternionInterpolate

In addition, a const qualifier has been added to aiQuaterniont::Rotate to allow call to this method via a const aiQuaterniont pointer.
2020-03-26 13:08:40 -04:00
Kim Kulling 96c7c567e6
Merge branch 'master' into kimkulling_dev 2020-03-26 11:56:45 +01:00
Max Vollmer (Microsoft Havok) 3c9751ce0c
Merge branch 'master' into GLTF2_recursive_references_fix 2020-03-26 10:16:58 +00:00
kimkulling ccd13436da fix memory leak during export 2020-03-25 16:37:43 +01:00
napina 14b8d1242b Added pre and post rotation handling to FBXConverter::GenerateSimpleNodeAnim. Fixed quaternion interpolation flip. Cleaned code. 2020-03-25 08:20:31 +02:00
napina b962af93fc Merge branch 'master' of https://github.com/assimp/assimp 2020-03-24 21:35:22 +02:00
Max Vollmer (Microsoft Havok) ec17aff6d6
Merge branch 'master' into GLTF2_invalid_buffer_fix 2020-03-24 11:56:44 +00:00
Max Vollmer (Microsoft Havok) ef20cdc430
Merge branch 'master' into GLTF2_guarantee_rootnode_fix 2020-03-24 11:56:42 +00:00
Max Vollmer (Microsoft Havok) 2820edee54
Merge branch 'master' into GLTF2_recursive_references_fix 2020-03-24 11:56:38 +00:00
simon chen 891b1d4b3f
Merge branch 'master' into fix_FBX_no_preservePivots_bug 2020-03-24 14:38:23 +08:00
Andy Maloney 046f50880f {cmake} Prefix assimp options with "ASSIMP_" to avoid pollution when included as a submodule
When libraries are included as submodules in large projects, having an option with a generic name like "BUILD_DOCS" is not very helpful. (e.g. one project I work on includes many libraries as submodules)

It can also clash with options from other libraries which can break things.
2020-03-23 12:35:32 -04:00
napina bb4bcb442a Merge branch 'master' of https://github.com/assimp/assimp 2020-03-23 10:35:06 +02:00
Max Vollmer (Microsoft Havok) 2006eeed85
Merge branch 'master' into GLTF2_recursive_references_fix 2020-03-23 08:07:25 +00:00
Max Vollmer (Microsoft Havok) 94da6d61a4
Merge branch 'master' into GLTF2_invalid_buffer_fix 2020-03-23 08:03:29 +00:00
Kim Kulling 6f8d96b57e
Merge branch 'master' into kimkulling_dev 2020-03-23 09:00:41 +01:00
Max Vollmer (Microsoft Havok) 973e38ad97
Merge branch 'master' into GLTF2_guarantee_rootnode_fix 2020-03-23 07:57:38 +00:00
napina f0243cc7f3 Changed AI_LMW_MAX_WEIGHTS*2 to 8 which is same thing. 2020-03-22 15:58:12 +02:00
Kim Kulling c0ae9b6040 fix invalid check 2020-03-22 14:21:24 +01:00
Kim Kulling 68a9fa2df3 reformat unittests. 2020-03-22 12:13:09 +01: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
Kim Kulling 4283e61189 fix clang-compiler warning: wrong move constructor. 2020-03-21 18:25:49 +01:00
Kim Kulling 089ab0693a fix static-code-analysis check. 2020-03-21 18:03:35 +01:00