- fixed python error when there is no active object
authorCampbell Barton <ideasman42@gmail.com>
Mon, 19 Oct 2009 11:39:57 +0000 (11:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 19 Oct 2009 11:39:57 +0000 (11:39 +0000)
- made sequence strip selection more like object mode - only de-select the active with Shift+RMB

release/scripts/ui/space_view3d.py
source/blender/editors/space_sequencer/sequencer_select.c

index b4300710dab94213fef9b8736ae18be98f88114f..9fd9e1283cd8d70da7c7b01568766d4a0f8ab822 100644 (file)
@@ -1233,7 +1233,6 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel):
                view = context.space_data
                gs = context.scene.game_data
                ob = context.object
-               mesh = context.active_object.data
                
                col = layout.column()
                col.itemR(view, "display_floor", text="Grid Floor")
@@ -1243,7 +1242,8 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel):
                col.itemR(view, "outline_selected")
                col.itemR(view, "all_object_centers")
                col.itemR(view, "relationship_lines")
-               if ob.type =='MESH':
+               if ob and ob.type =='MESH':
+                       mesh = context.active_object.data
                        col.itemR(mesh, "all_edges")
                
                col = layout.column()
index fe46cb178ae4d6fbfa93ba8850bc2b6b0b3d4d71..e03cb6ddc94576ccd040beca936246e4affc27d0 100644 (file)
@@ -296,8 +296,8 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
 
        short mval[2];  
        
-       Sequence *seq,*neighbor;
-       int hand,sel_side, shift= 0; // XXX
+       Sequence *seq,*neighbor, *act_orig;
+       int hand,sel_side;
        TimeMarker *marker;
 
        if(ed==NULL)
@@ -311,7 +311,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
        if (marker) {
                int oldflag;
                /* select timeline marker */
-               if (shift) {
+               if (extend) {
                        oldflag= marker->flag;
                        if (oldflag & SELECT)
                                marker->flag &= ~SELECT;
@@ -326,6 +326,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
        } else {
        
                seq= find_nearest_seq(scene, v2d, &hand, mval);
+               act_orig= ed->act_seq;
 
                if(extend == 0 && linked_left==0 && linked_right==0)
                        deselect_all_seq(scene);
@@ -344,7 +345,7 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
                                }
                        }
        
-                       if(extend && (seq->flag & SELECT)) {
+                       if(extend && (seq->flag & SELECT) && ed->act_seq == act_orig ) {
                                switch(hand) {
                                case SEQ_SIDE_NONE:
                                        if (linked_left==0 && linked_right==0)