From 18b7b14a81ba3ead0d595ff0db50ec7bedd86ca2 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Tue, 20 Sep 2011 03:46:54 +0000 Subject: Rigify: changed quat/vector multiplication order to conform to api changes. --- rigify/rig_ui_template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rigify/rig_ui_template.py') diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py index a54ab175..f21c4096 100644 --- a/rigify/rig_ui_template.py +++ b/rigify/rig_ui_template.py @@ -81,7 +81,7 @@ def set_pose_translation(pose_bone, mat): par_rest = Matrix() q = (par_rest.inverted() * rest).to_quaternion() - pose_bone.location = loc * q + pose_bone.location = q * loc def set_pose_rotation(pose_bone, mat): @@ -200,7 +200,7 @@ def match_pole_target(ik_first, ik_last, pole, match_bone, length): # Compensate for the rotation difference if angle > 0.0001: - pv *= Matrix.Rotation(angle, 4, ikv).to_quaternion() + pv = Matrix.Rotation(angle, 4, ikv).to_quaternion() * pv set_pole(pv) # Get rotation difference again, to see if we @@ -210,7 +210,7 @@ def match_pole_target(ik_first, ik_last, pole, match_bone, length): angle2 = acos(min(1,max(-1,q1.dot(q2)))) * 2 if angle2 > 0.0001: # Compensate in the other direction - pv *= Matrix.Rotation((angle*(-2)), 4, ikv).to_quaternion() + pv = Matrix.Rotation((angle*(-2)), 4, ikv).to_quaternion() * pv set_pole(pv) -- cgit v1.2.3