Skip to content
Snippets Groups Projects
Commit 01dd77b4 authored by Campbell Barton's avatar Campbell Barton
Browse files

use reverse vector multiplication order

parent abfc9fa5
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ def align_roll(obj, bone1, bone2):
rot_mat = Matrix.Rotation(angle, 3, axis)
# Roll factor
x3 = x1 * rot_mat
x3 = rot_mat * x1
dot = x2 * x3
if dot > 1.0:
dot = 1.0
......@@ -60,7 +60,7 @@ def align_roll(obj, bone1, bone2):
bone1_e.roll = roll
# Check if we rolled in the right direction
x3 = bone1_e.x_axis * rot_mat
x3 = rot_mat * bone1_e.x_axis
check = x2 * x3
# If not, reverse
......
......@@ -48,7 +48,7 @@ def align_roll(obj, bone1, bone2):
rot_mat = Matrix.Rotation(angle, 3, axis)
# Roll factor
x3 = x1 * rot_mat
x3 = rot_mat * x1
dot = x2 * x3
if dot > 1.0:
dot = 1.0
......@@ -60,7 +60,7 @@ def align_roll(obj, bone1, bone2):
bone1_e.roll = roll
# Check if we rolled in the right direction
x3 = bone1_e.x_axis * rot_mat
x3 = rot_mat * bone1_e.x_axis
check = x2 * x3
# If not, reverse
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment