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-04-11 10:10:07 +0400
committerNathan Vegdahl <cessen@cessen.com>2011-04-11 10:10:07 +0400
commit8da041a311f52f0232010132c137218f9dda33f8 (patch)
treec1984dd208b26aad75df7c842b86c89bf4e85b51 /rigify/rig_ui_template.py
parent940b6cd35872f67265efcf1a616959890076f941 (diff)
Rigify: fixed broken ik/fk snapping (api changes).
Diffstat (limited to 'rigify/rig_ui_template.py')
-rw-r--r--rigify/rig_ui_template.py40
1 files changed, 5 insertions, 35 deletions
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index 516525a2..db3bb6cb 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -49,42 +49,12 @@ def get_pose_matrix_in_other_space(mat, pose_bone):
# Get matrix in bone's current transform space
smat = rest_inv * (par_rest * (par_inv * mat))
- # Compensate for non-inherited rotation/scale
- if not pose_bone.bone.use_inherit_rotation:
- loc = mat.to_translation()
- loc -= (par_mat*(par_rest.inverted() * rest)).to_translation()
- loc *= rest.inverted().to_quaternion()
- if pose_bone.bone.use_inherit_scale:
- t = par_mat.to_scale()
- par_scale = Matrix.Scale(t[0], 4, Vector((1,0,0)))
- par_scale *= Matrix.Scale(t[1], 4, Vector((0,1,0)))
- par_scale *= Matrix.Scale(t[2], 4, Vector((0,0,1)))
- else:
- par_scale = Matrix()
-
- smat = rest_inv * mat * par_scale.inverted()
- smat[3][0] = loc[0]
- smat[3][1] = loc[1]
- smat[3][2] = loc[2]
- elif not pose_bone.bone.use_inherit_scale:
- loc = smat.to_translation()
- rot = smat.to_quaternion()
- scl = mat.to_scale()
-
- smat = Matrix.Scale(scl[0], 4, Vector((1,0,0)))
- smat *= Matrix.Scale(scl[1], 4, Vector((0,1,0)))
- smat *= Matrix.Scale(scl[2], 4, Vector((0,0,1)))
- smat *= Matrix.Rotation(rot.angle, 4, rot.axis)
- smat[3][0] = loc[0]
- smat[3][1] = loc[1]
- smat[3][2] = loc[2]
-
# Compensate for non-local location
- if not pose_bone.bone.use_local_location:
- loc = smat.to_translation() * (par_rest.inverted() * rest).to_quaternion()
- smat[3][0] = loc[0]
- smat[3][1] = loc[1]
- smat[3][2] = loc[2]
+ #if not pose_bone.bone.use_local_location:
+ # loc = smat.to_translation() * (par_rest.inverted() * rest).to_quaternion()
+ # smat[3][0] = loc[0]
+ # smat[3][1] = loc[1]
+ # smat[3][2] = loc[2]
return smat