svn merge ^/trunk/blender -r46629:46632
authorCampbell Barton <ideasman42@gmail.com>
Mon, 14 May 2012 14:55:10 +0000 (14:55 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 14 May 2012 14:55:10 +0000 (14:55 +0000)
release/scripts/startup/bl_operators/object.py
source/blender/editors/space_clip/space_clip.c

index 8268d7a9514ff55f03545cf82b9fd89debbd2926..358919ac88806ac40f3c17045a685656731bcd46 100644 (file)
@@ -104,24 +104,29 @@ class SelectPattern(Operator):
 
 
 class SelectCamera(Operator):
-    '''Select object matching a naming pattern'''
+    '''Select the active camera'''
     bl_idname = "object.select_camera"
     bl_label = "Select Camera"
     bl_options = {'REGISTER', 'UNDO'}
 
-    @classmethod
-    def poll(cls, context):
-        return context.scene.camera is not None
-
     def execute(self, context):
         scene = context.scene
-        camera = scene.camera
-        if camera.name not in scene.objects:
+        view = context.space_data
+        if view.type == 'VIEW_3D' and not view.lock_camera_and_layers:
+            camera = view.camera
+        else:
+            camera = scene.camera
+
+        if camera is None:
+            self.report({'WARNING'}, "No camera found")
+        elif camera.name not in scene.objects:
             self.report({'WARNING'}, "Active camera is not in this scene")
+        else:
+            context.scene.objects.active = camera
+            camera.select = True
+            return {'FINISHED'}
 
-        context.scene.objects.active = camera
-        camera.select = True
-        return {'FINISHED'}
+        return {'CANCELLED'}
 
 
 class SelectHierarchy(Operator):
index 4c346e9aa3fade986b82b20f5d42fbcd880f0bf9..75c60ed5b60f07970973ae9710a07cfe0e413a11 100644 (file)
@@ -610,13 +610,13 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "CLIP_OT_select_circle", CKEY, KM_PRESS, 0, 0);
        WM_keymap_add_menu(keymap, "CLIP_MT_select_grouped", GKEY, KM_PRESS, KM_SHIFT, 0);
 
-       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_ALT, 0);
        RNA_boolean_set(kmi->ptr, "deselect", FALSE);
-       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT, 0);
+       kmi = WM_keymap_add_item(keymap, "CLIP_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL | KM_SHIFT | KM_ALT, 0);
        RNA_boolean_set(kmi->ptr, "deselect", TRUE);
 
        /* marker */
-       WM_keymap_add_item(keymap, "CLIP_OT_add_marker_slide", LEFTMOUSE, KM_CLICK, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "CLIP_OT_add_marker_slide", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
 
        WM_keymap_add_item(keymap, "CLIP_OT_delete_marker", DELKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "CLIP_OT_delete_marker", XKEY, KM_PRESS, KM_SHIFT, 0);