[Bf-extensions-cvs] [ea1c1209] blender2.8: Rigify: Fix remaining math update (*/@)
Dalai Felinto
noreply at git.blender.org
Tue Oct 23 22:13:32 CEST 2018
Commit: ea1c120920d1d7ddc9357d199d8d60ce423ec980
Author: Dalai Felinto
Date: Tue Oct 23 17:12:28 2018 -0300
Branches: blender2.8
https://developer.blender.org/rBAea1c120920d1d7ddc9357d199d8d60ce423ec980
Rigify: Fix remaining math update (*/@)
===================================================================
M rigify/legacy/utils.py
M rigify/utils.py
===================================================================
diff --git a/rigify/legacy/utils.py b/rigify/legacy/utils.py
index 35bbd7b9..f70a9967 100644
--- a/rigify/legacy/utils.py
+++ b/rigify/legacy/utils.py
@@ -342,7 +342,7 @@ def obj_to_bone(obj, rig, bone_name):
bone = rig.data.bones[bone_name]
- mat = rig.matrix_world * bone.matrix_local
+ mat = rig.matrix_world @ bone.matrix_local
obj.location = mat.to_translation()
@@ -607,8 +607,8 @@ def align_bone_roll(obj, bone1, bone2):
rot_mat = Matrix.Rotation(angle, 3, axis)
# Roll factor
- x3 = rot_mat * x1
- dot = x2 * x3
+ x3 = rot_mat @ x1
+ dot = x2 @ x3
if dot > 1.0:
dot = 1.0
elif dot < -1.0:
@@ -619,7 +619,7 @@ def align_bone_roll(obj, bone1, bone2):
bone1_e.roll = roll
# Check if we rolled in the right direction
- x3 = rot_mat * bone1_e.x_axis
+ x3 = rot_mat @ bone1_e.x_axis
check = x2 * x3
# If not, reverse
diff --git a/rigify/utils.py b/rigify/utils.py
index fdb87013..2d5ac3f5 100644
--- a/rigify/utils.py
+++ b/rigify/utils.py
@@ -815,8 +815,8 @@ def align_bone_roll(obj, bone1, bone2):
bone1_e.roll = roll
# Check if we rolled in the right direction
- x3 = rot_mat * bone1_e.x_axis
- check = x2 * x3
+ x3 = rot_mat @ bone1_e.x_axis
+ check = x2 @ x3
# If not, reverse
if check < 0.9999:
More information about the Bf-extensions-cvs
mailing list