more vector order switching.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jul 2011 09:31:39 +0000 (09:31 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jul 2011 09:31:39 +0000 (09:31 +0000)
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/object_align.py

index c8ed3f532fd5af0b0ffc1dda5ce8b0f8068aebf9..0f0491e249efc57e2d04ce75cec2f8a60e2ee36f 100644 (file)
@@ -542,7 +542,7 @@ class MakeDupliFace(bpy.types.Operator):
             trans = matrix.to_translation()
             rot = matrix.to_3x3()  # also contains scale
 
-            return [(b * rot) + trans for b in base_tri]
+            return [(rot * b) + trans for b in base_tri]
         scene = bpy.context.scene
         linked = {}
         for obj in bpy.context.selected_objects:
index 2a7ae0c993b88de07b7758fa2fcf6e860b4ecacc..8fe606399b4d65eb9debd4da4c86d9aef14369d0 100644 (file)
@@ -69,7 +69,7 @@ def GlobalBB_HQ(obj):
 
     verts = obj.data.vertices
 
-    val = verts[-1].co * matrix_world
+    val = matrix_world * verts[-1].co
 
     left, right, front, back, down, up = (val[0],
                                           val[0],
@@ -82,7 +82,7 @@ def GlobalBB_HQ(obj):
     # Test against all other verts
     for i in range (len(verts)-1):
 
-        vco = verts[i].co * matrix_world
+        vco = matrix_world * verts[i].co
 
         # X Range
         val = vco[0]
@@ -128,8 +128,8 @@ def align_objects(align_x,
     objs = []
 
     for obj in bpy.context.selected_objects:
-        matrix_world = obj.matrix_world
-        bb_world = [Vector(v[:]) * matrix_world for v in obj.bound_box]
+        matrix_world = obj.matrix_world.copy()
+        bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
         objs.append((obj, bb_world))
 
     if not objs:
@@ -198,7 +198,8 @@ def align_objects(align_x,
     # Main Loop
 
     for obj, bb_world in objs:
-        bb_world = [Vector(v[:]) * obj.matrix_world for v in obj.bound_box]
+        matrix_world = obj.matrix_world.copy()
+        bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
 
         if bb_quality:
             GBB = GlobalBB_HQ(obj)