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>2016-02-26 00:20:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-26 00:21:29 +0300
commitef7791ff20b44ec8228e66e6e905f1ad916b1d82 (patch)
tree37b97529133e6f0c09f33d7e525ea19f7a824280 /release
parentb50e880e49809118c5a2f8f7ece5cf4b22557a1b (diff)
Fix for object align not using local view cursor
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/object_align.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index 3c84e5dc553..5c3d95e113c 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -125,7 +125,10 @@ def align_objects(context,
relative_to,
bb_quality):
- cursor = context.scene.cursor_location
+ scene = context.scene
+ space = context.space_data
+
+ cursor = (space if space and space.type == 'VIEW_3D' else scene).cursor_location
Left_Front_Up_SEL = [0.0, 0.0, 0.0]
Right_Back_Down_SEL = [0.0, 0.0, 0.0]
@@ -136,7 +139,7 @@ def align_objects(context,
for obj in context.selected_objects:
matrix_world = obj.matrix_world.copy()
- bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
+ bb_world = [matrix_world * Vector(v) for v in obj.bound_box]
objects.append((obj, bb_world))
if not objects: