A different approach for the new driver option: it now uses pose-space
authorTon Roosendaal <ton@blender.org>
Sun, 4 Nov 2007 19:41:21 +0000 (19:41 +0000)
committerTon Roosendaal <ton@blender.org>
Sun, 4 Nov 2007 19:41:21 +0000 (19:41 +0000)
instead of bone-space. This makes it visual easier to use. For the todo:
a large array of buttons for users to pick what kind of 'space' is used?

source/blender/blenkernel/intern/ipo.c

index 2e8dbccbe53942f6be3eb6e6128ad032fdf50f83..107633eda64a1ce1883418af49a483970b4618fd 100644 (file)
@@ -849,8 +849,10 @@ static float eval_driver(IpoDriver *driver, float ipotime)
                                        if(pchan2 && pchan2->bone) {
                                                float q1[4], q2[4], quat[4], angle;
                                                
-                                               posechannel_get_local_transform(pchan , q1, NULL, NULL, 0);
-                                               posechannel_get_local_transform(pchan2, q2, NULL, NULL, 0);
+                                               Mat4ToQuat(pchan->pose_mat, q1);
+                                               Mat4ToQuat(pchan2->pose_mat, q2);
+                                               // posechannel_get_local_transform(pchan , q1, NULL, NULL, 0);
+                                               // posechannel_get_local_transform(pchan2, q2, NULL, NULL, 0);
                                                
                                                QuatInv(q1);
                                                QuatMul(quat, q1, q2);