Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-07-25 13:31:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-07-25 13:31:39 +0400
commite882925b49f57a9e8fe59c37a0eb00d2498a4e87 (patch)
treecef4fd196a1014359d0454d3bb3adfbf1576ab39 /release
parent799714fbc9e3769f431fd8e53dcf6f725daa6bae (diff)
more vector order switching.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/object.py2
-rw-r--r--release/scripts/startup/bl_operators/object_align.py11
2 files changed, 7 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index c8ed3f532fd..0f0491e249e 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -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:
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index 2a7ae0c993b..8fe606399b4 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -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)