[Bf-blender-cvs] [be40f31d039] master: Keyframing: replace mat3_to_quat_is_ok with mat4_to_quat

Campbell Barton noreply at git.blender.org
Thu Aug 25 06:33:31 CEST 2022


Commit: be40f31d0392e356d065fb6e1cd1ca8a3e66f048
Author: Campbell Barton
Date:   Thu Aug 25 14:05:31 2022 +1000
Branches: master
https://developer.blender.org/rBbe40f31d0392e356d065fb6e1cd1ca8a3e66f048

Keyframing: replace mat3_to_quat_is_ok with mat4_to_quat

Added [0] which notes in most cases results are the same but in some
cases the result seems better. While true at the time of writing since
then mat3_to_quat has been improved and used for nearly all matrix
to quaternion conversion.

0: 876cfc837e2f065fa370940ca578983d84c48a11

===================================================================

M	source/blender/editors/animation/keyframing.c

===================================================================

diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 12f83343299..acf53541843 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1081,10 +1081,7 @@ static float *visualkey_get_values(
   }
 
   if (strstr(identifier, "rotation_quaternion")) {
-    float mat3[3][3];
-
-    copy_m3_m4(mat3, tmat);
-    mat3_to_quat_is_ok(buffer, mat3);
+    mat4_to_quat(buffer, tmat);
 
     *r_count = 4;
     return buffer;



More information about the Bf-blender-cvs mailing list