diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-11-22 23:30:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-22 23:30:19 +0100 |
commit | f673bd017d717bae97f01bffc09ac2debb4fb39a (patch) | |
tree | cf69dbdd70c5c743770af2d5ff50082d895fa955 /editor/import | |
parent | 20b6f104ff0505ed5cf7b2d65741965601d9c1d8 (diff) | |
parent | 3f22f8d1f04d896fc01b387f66120c2c531939a5 (diff) |
Merge pull request #23885 from glaforte/bugfix/22848-attempt2
Avoids error messages when importing zero scale transforms in the COLLADA importer
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/editor_import_collada.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index b133efead7..afd09748f3 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -1655,7 +1655,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones } } - Quat q = xform.basis.get_rotation_quat(); + Quat q = Math::is_equal_approx(xform.basis.determinant(), 0) ? Quat() : xform.basis.get_rotation_quat(); Vector3 s = xform.basis.get_scale(); Vector3 l = xform.origin; @@ -1705,7 +1705,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform; - Quat q = xform.basis.get_rotation_quat(); + Quat q = Math::is_equal_approx(xform.basis.determinant(), 0) ? Quat() : xform.basis.get_rotation_quat(); Vector3 s = xform.basis.get_scale(); Vector3 l = xform.origin; |