diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-09 07:39:25 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-09 07:39:25 +0300 |
commit | eb848445fb44808aed86bc4238ab02c497c1eb2f (patch) | |
tree | 807946422493b46a3690262ddf46440ac00c533a /source/blender/editors/space_sequencer | |
parent | 52e1121669cdf4a0b23bbc41eb8d1d342c19ba87 (diff) |
2.5 - Assorted View2D-Related Cleanups
* Removed Sequencer's own 'border zoom' tool. There is a generic one in View2D that should be used instead.
* Changed the hotkey for View2D's version of borderzoom to Shift-B
* Fixed a few hotkey mentions entries in old menus
* Added set start/end frame operators for TimeLine. (SKEY and EKEY)
* Fixed various issues in Graph Editor
- channels area is now drawn wide enough to show the 'protect' toggles without needing to scroll
- new Graph Editors have 'auto-snap' enabled by default
Diffstat (limited to 'source/blender/editors/space_sequencer')
4 files changed, 6 insertions, 73 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 8c70e1d9b2d..ea1b36af137 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -590,8 +590,8 @@ static void reload_sound_strip(Scene *scene, char *name) static void reload_image_strip(Scene *scene, char *name) { Editing *ed= seq_give_editing(scene, FALSE); - Sequence *seq, *seqact; - SpaceFile *sfile; + Sequence *seq=NULL, *seqact; + SpaceFile *sfile=NULL; Sequence *last_seq= get_last_seq(scene); @@ -2392,65 +2392,3 @@ void SEQUENCER_OT_view_selected(wmOperatorType *ot) /* flags */ ot->flag= OPTYPE_REGISTER; } - - - - -/* borderselect operator */ -static int sequencer_view_zoom_exec(bContext *C, wmOperator *op) -{ - bScreen *sc= CTX_wm_screen(C); - ScrArea *area= CTX_wm_area(C); - View2D *v2d= UI_view2d_fromcontext(C); - rcti rect; - rctf rectf; - - int val; - short mval[2]; - - val= RNA_int_get(op->ptr, "event_type"); - rect.xmin= RNA_int_get(op->ptr, "xmin"); - rect.ymin= RNA_int_get(op->ptr, "ymin"); - rect.xmax= RNA_int_get(op->ptr, "xmax"); - rect.ymax= RNA_int_get(op->ptr, "ymax"); - - mval[0]= rect.xmin; - mval[1]= rect.ymin; - UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmin, &rectf.ymin); - mval[0]= rect.xmax; - mval[1]= rect.ymax; - UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmax, &rectf.ymax); - - v2d->cur= rectf; - UI_view2d_curRect_validate(v2d); - UI_view2d_sync(sc, area, v2d, V2D_LOCK_COPY); - - return OPERATOR_FINISHED; -} - - -/* ****** Border Select ****** */ -void SEQUENCER_OT_view_zoom(wmOperatorType *ot) -{ - /* identifiers */ - ot->name= "View Zoom"; - ot->idname= "SEQUENCER_OT_view_zoom"; - - /* api callbacks */ - ot->invoke= WM_border_select_invoke; - ot->exec= sequencer_view_zoom_exec; - ot->modal= WM_border_select_modal; - - ot->poll= ED_operator_sequencer_active; - - /* flags */ - ot->flag= OPTYPE_REGISTER; - - /* rna */ - RNA_def_int(ot->srna, "event_type", 0, INT_MIN, INT_MAX, "Event Type", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, "Y Min", "", INT_MIN, INT_MAX); - RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, "Y Max", "", INT_MIN, INT_MAX); -} - diff --git a/source/blender/editors/space_sequencer/sequencer_header.c b/source/blender/editors/space_sequencer/sequencer_header.c index 416fda02041..c543c13bbf5 100644 --- a/source/blender/editors/space_sequencer/sequencer_header.c +++ b/source/blender/editors/space_sequencer/sequencer_header.c @@ -113,9 +113,7 @@ static uiBlock *seq_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiDefMenuSep(block); /* Lock Time */ -#define V2D_VIEWLOCK 0 // XXX add back - - uiDefIconTextBut(block, BUTM, 1, (v2d->flag & V2D_VIEWLOCK)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT, + uiDefIconTextBut(block, BUTM, 1, (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT, "Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, ""); @@ -123,9 +121,9 @@ static uiBlock *seq_viewmenu(bContext *C, ARegion *ar, void *arg_unused) uiDefMenuSep(block); if(sseq->flag & SEQ_DRAWFRAMES) - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Seconds|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); else - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Frames|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); if(!sa->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,0, ""); @@ -501,7 +499,7 @@ void sequencer_header_buttons(const bContext *C, ARegion *ar) 0, 0, 0, 0, "Zooms view in and out (Ctrl MiddleMouse)"); xco += XIC; - uiDefIconButO(block, BUT, "SEQUENCER_OT_view_zoom", WM_OP_INVOKE_REGION_WIN, ICON_BORDERMOVE, xco,yco,XIC,YIC, "Zooms view to fit area"); + uiDefIconButO(block, BUT, "View2D_OT_view_borderzoom", WM_OP_INVOKE_REGION_WIN, ICON_BORDERMOVE, xco,yco,XIC,YIC, "Zooms view to fit area"); uiBlockEndAlign(block); xco += 8 + XIC; diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 613bf0c3c74..ef583e56dd4 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -87,7 +87,6 @@ void SEQUENCER_OT_meta_separate(struct wmOperatorType *ot); void SEQUENCER_OT_view_all(struct wmOperatorType *ot); void SEQUENCER_OT_view_selected(struct wmOperatorType *ot); -void SEQUENCER_OT_view_zoom(struct wmOperatorType *ot); /* sequencer_select.c */ void SEQUENCER_OT_deselect_all(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index f17efe19a21..6797a080798 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -80,7 +80,6 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_view_all); WM_operatortype_append(SEQUENCER_OT_view_selected); - WM_operatortype_append(SEQUENCER_OT_view_zoom); /* sequencer_select.c */ WM_operatortype_append(SEQUENCER_OT_deselect_all); @@ -137,7 +136,6 @@ void sequencer_keymap(wmWindowManager *wm) WM_keymap_add_item(keymap, "SEQUENCER_OT_view_all", HOMEKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "SEQUENCER_OT_view_zoom", BKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); |