update for mathutils vector/matrix order change.
authorCampbell Barton <ideasman42@gmail.com>
Sun, 14 Nov 2010 07:02:55 +0000 (07:02 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 14 Nov 2010 07:02:55 +0000 (07:02 +0000)
release/scripts/modules/bpy_types.py

index da51b61362d58ae48fd6606337e9763f6c1def2b..a9bcf3ab6c69ef7bbee28524d3d412d016e74a45 100644 (file)
@@ -142,19 +142,19 @@ class _GenericBone:
     def x_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector((1.0, 0.0, 0.0))
+        return Vector((1.0, 0.0, 0.0)) * self.matrix.rotation_part()
 
     @property
     def y_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector((0.0, 1.0, 0.0))
+        return Vector((0.0, 1.0, 0.0)) * self.matrix.rotation_part()
 
     @property
     def z_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector((0.0, 0.0, 1.0))
+        return Vector((0.0, 0.0, 1.0)) * self.matrix.rotation_part()
 
     @property
     def basename(self):
@@ -284,13 +284,13 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaIDProp):
         Expects a 4x4 or 3x3 matrix.
         """
         from mathutils import Vector
-        z_vec = self.matrix.rotation_part() * Vector((0.0, 0.0, 1.0))
-        self.tail = matrix * self.tail
-        self.head = matrix * self.head
+        z_vec = Vector((0.0, 0.0, 1.0)) * self.matrix.rotation_part()
+        self.tail = self.tail * matrix
+        self.head = self.head * matrix
         scalar = matrix.median_scale
         self.head_radius *= scalar
         self.tail_radius *= scalar
-        self.align_roll(matrix * z_vec)
+        self.align_roll(z_vec * matrix)
 
 
 def ord_ind(i1, i2):