Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Vegdahl <cessen@cessen.com>2011-09-20 07:46:54 +0400
committerNathan Vegdahl <cessen@cessen.com>2011-09-20 07:46:54 +0400
commit18b7b14a81ba3ead0d595ff0db50ec7bedd86ca2 (patch)
tree70bd5dc35182f4205c311762e465850a199e6b9b /rigify/rig_ui_template.py
parent6085c7ac28aa754667ade105a45530f70bda435d (diff)
Rigify: changed quat/vector multiplication order to conform to api changes.
Diffstat (limited to 'rigify/rig_ui_template.py')
-rw-r--r--rigify/rig_ui_template.py6
1 files changed, 3 insertions, 3 deletions
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)