diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-05 10:08:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-05 10:08:34 +0300 |
commit | 696b0366f5c46dcfcb50f53b4ca4f59c593b88fb (patch) | |
tree | 8dfbeb67383adc39b5742c661f61a55eb4066659 /rigify | |
parent | dfd3febce161e76015beb0faac516724aceff453 (diff) |
update for changes in mathutuils.
Diffstat (limited to 'rigify')
-rw-r--r-- | rigify/rigs/misc/delta.py | 6 | ||||
-rw-r--r-- | rigify/utils.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/rigify/rigs/misc/delta.py b/rigify/rigs/misc/delta.py index 2157970a..bc5f7eba 100644 --- a/rigify/rigs/misc/delta.py +++ b/rigify/rigs/misc/delta.py @@ -144,15 +144,15 @@ def set_mat(obj, bone_name, matrix): a.transform(matrix) - d = acos(a.matrix.to_quat().dot(matrix.to_quat())) * 2 + d = acos(a.matrix.to_quaternion().dot(matrix.to_quaternion())) * 2.0 roll_1 = a.roll + d roll_2 = a.roll - d a.roll = roll_1 - d1 = a.matrix.to_quat().dot(matrix.to_quat()) + d1 = a.matrix.to_quaternion().dot(matrix.to_quaternion()) a.roll = roll_2 - d2 = a.matrix.to_quat().dot(matrix.to_quat()) + d2 = a.matrix.to_quaternion().dot(matrix.to_quaternion()) if d1 > d2: a.roll = roll_1 diff --git a/rigify/utils.py b/rigify/utils.py index 84d4c4f1..f0a19aac 100644 --- a/rigify/utils.py +++ b/rigify/utils.py @@ -237,12 +237,12 @@ def obj_to_bone(obj, rig, bone_name): mat = rig.matrix_world * bone.matrix_local - obj.location = mat.translation_part() + obj.location = mat.to_translation() obj.rotation_mode = 'XYZ' obj.rotation_euler = mat.to_euler() - scl = mat.scale_part() + scl = mat.to_scale() scl_avg = (scl[0] + scl[1] + scl[2]) / 3 obj.scale = (bone.length * scl_avg), (bone.length * scl_avg), (bone.length * scl_avg) |