diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-12 14:48:10 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-12 14:48:10 +0400 |
commit | 5e6917a18e288b06cc8130aa8311453c9893dd0b (patch) | |
tree | 3f7a49a3d9b78408eabd3e11d55aa8b57d892a66 /release | |
parent | 45c453c9b11520cb8aad2b220c8d1592af9df94d (diff) |
patch [#33738] Extend Selection option unified and added to few operators
from Sebastian Nell (codemanx), with minor edits
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/object.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index 9e449f325d6..d6a0e30b110 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -110,6 +110,12 @@ class SelectCamera(Operator): bl_label = "Select Camera" bl_options = {'REGISTER', 'UNDO'} + extend = BoolProperty( + name="Extend", + description="Extend the selection", + default=False + ) + def execute(self, context): scene = context.scene view = context.space_data @@ -123,6 +129,8 @@ class SelectCamera(Operator): elif camera.name not in scene.objects: self.report({'WARNING'}, "Active camera is not in this scene") else: + if not self.extend: + bpy.ops.object.select_all(action='DESELECT') context.scene.objects.active = camera camera.select = True return {'FINISHED'} |