diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-11 09:05:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-11 09:36:23 +0300 |
commit | e43a948a2ca7aef365ac0e6808341215e35ee4ff (patch) | |
tree | 7395786a3a3c6efd2ebbf744047ba97d811c8fec /source/blender | |
parent | e916817520693302555e70931041df3d98876b51 (diff) |
Sequencer: view toggle no longer cycles over SEQUENCER_PREVIEW state
- Remove the operator, use a generic operator instead.
- Switch between PREVIEW/SEQUENCER as the mixed state isn't as useful.
- Add menu item to make the shortcut discoverable.
- Remove unused & broken "View Type" menu.
Diffstat (limited to 'source/blender')
3 files changed, 0 insertions, 50 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index f5eb9e88bd5..12533dbc74f 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -194,7 +194,6 @@ void SEQUENCER_OT_view_all(struct wmOperatorType *ot); void SEQUENCER_OT_view_frame(struct wmOperatorType *ot); void SEQUENCER_OT_view_all_preview(struct wmOperatorType *ot); void SEQUENCER_OT_view_zoom_ratio(struct wmOperatorType *ot); -void SEQUENCER_OT_view_toggle(struct wmOperatorType *ot); void SEQUENCER_OT_view_selected(struct wmOperatorType *ot); void SEQUENCER_OT_view_ghost_border(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 617ec9aef7b..0a7aa1a6072 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -116,7 +116,6 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_view_frame); WM_operatortype_append(SEQUENCER_OT_view_all_preview); WM_operatortype_append(SEQUENCER_OT_view_zoom_ratio); - WM_operatortype_append(SEQUENCER_OT_view_toggle); WM_operatortype_append(SEQUENCER_OT_view_selected); WM_operatortype_append(SEQUENCER_OT_view_ghost_border); } diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c index dcc18aad981..f91db3efef4 100644 --- a/source/blender/editors/space_sequencer/sequencer_view.c +++ b/source/blender/editors/space_sequencer/sequencer_view.c @@ -257,54 +257,6 @@ void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot) /** \} */ /* -------------------------------------------------------------------- */ -/** \name View Toggle Operator - * \{ */ - -#if 0 -static const EnumPropertyItem view_type_items[] = { - {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, - {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""}, - {SEQ_VIEW_SEQUENCE_PREVIEW, - "SEQUENCER_PREVIEW", - ICON_SEQ_SEQUENCER, - "Sequencer and Image Preview", - ""}, - {0, NULL, 0, NULL, NULL}, -}; -#endif - -static int sequencer_view_toggle_exec(bContext *C, wmOperator *UNUSED(op)) -{ - SpaceSeq *sseq = (SpaceSeq *)CTX_wm_space_data(C); - - sseq->view++; - if (sseq->view > SEQ_VIEW_SEQUENCE_PREVIEW) { - sseq->view = SEQ_VIEW_SEQUENCE; - } - - ED_area_tag_refresh(CTX_wm_area(C)); - - return OPERATOR_FINISHED; -} - -void SEQUENCER_OT_view_toggle(wmOperatorType *ot) -{ - /* Identifiers. */ - ot->name = "View Toggle"; - ot->idname = "SEQUENCER_OT_view_toggle"; - ot->description = "Toggle between sequencer views (sequence, preview, both)"; - - /* Api callbacks. */ - ot->exec = sequencer_view_toggle_exec; - ot->poll = ED_operator_sequencer_active; - - /* Flags. */ - ot->flag = OPTYPE_REGISTER; -} - -/** \} */ - -/* -------------------------------------------------------------------- */ /** \name Frame Selected Operator * \{ */ |