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:
Diffstat (limited to 'release/scripts/startup/bl_operators/object_align.py')
-rw-r--r--release/scripts/startup/bl_operators/object_align.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index b7d3866989d..4af0b7f9e15 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -65,13 +65,13 @@ def GlobalBB_LQ(bb_world):
return (Vector((left, front, up)), Vector((right, back, down)))
-def GlobalBB_HQ(obj):
+def GlobalBB_HQ(scene, obj):
matrix_world = obj.matrix_world.copy()
# Initialize the variables with the last vertex
- me = obj.to_mesh(scene=bpy.context.scene, apply_modifiers=True, settings='PREVIEW')
+ me = obj.to_mesh(scene=scene, apply_modifiers=True, settings='PREVIEW')
verts = me.vertices
val = matrix_world * verts[-1].co
@@ -154,7 +154,7 @@ def align_objects(context,
for obj, bb_world in objects:
if bb_quality and obj.type == 'MESH':
- GBB = GlobalBB_HQ(obj)
+ GBB = GlobalBB_HQ(scene, obj)
else:
GBB = GlobalBB_LQ(bb_world)
@@ -218,7 +218,7 @@ def align_objects(context,
bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
if bb_quality and obj.type == 'MESH':
- GBB = GlobalBB_HQ(obj)
+ GBB = GlobalBB_HQ(scene, obj)
else:
GBB = GlobalBB_LQ(bb_world)