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:
authorCampbell Barton <ideasman42@gmail.com>2011-03-26 03:43:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-26 03:43:10 +0300
commit007092f081d7a7a5f453ebd7c89e859dfce39d8e (patch)
tree83dbec263d557afec2fd53671bde19847a5acd0f /rigify/rig_ui_template.py
parent7d2c21dfcaea40442e5370c9f494b7c11d9da5dd (diff)
Scale is a class method, no need to instance the class first.
Matrix().Scale --> Matrix.Scale
Diffstat (limited to 'rigify/rig_ui_template.py')
-rw-r--r--rigify/rig_ui_template.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index 136cb44b..516525a2 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -39,7 +39,7 @@ def get_pose_matrix_in_other_space(mat, pose_bone):
rest_inv = rest.inverted()
if pose_bone.parent:
par_mat = pose_bone.parent.matrix.copy()
- par_inv = pose_bone.parent.matrix.inverted()
+ par_inv = par_mat.inverted()
par_rest = pose_bone.parent.bone.matrix_local.copy()
else:
par_mat = Matrix()
@@ -56,9 +56,9 @@ def get_pose_matrix_in_other_space(mat, pose_bone):
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)))
+ 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()
@@ -71,9 +71,9 @@ def get_pose_matrix_in_other_space(mat, pose_bone):
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.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]
@@ -215,7 +215,7 @@ def match_pole_target(ik_first, ik_last, pole, match_bone, length):
ploc = a + (ikv/2) + pvi
# Set pole target to location
- mat = get_pose_matrix_in_other_space(Matrix().Translation(ploc), pole)
+ mat = get_pose_matrix_in_other_space(Matrix.Translation(ploc), pole)
set_pose_translation(pole, mat)
bpy.ops.object.mode_set(mode='OBJECT')