diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-24 13:53:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-24 13:53:29 +0400 |
commit | 7949f0057fb97773ee1f4937703c1b34bfd32c28 (patch) | |
tree | b2c51cc42df6a899df1a00a03b1f5b7b21ad91a9 /source/blender/editors/space_sequencer/sequencer_edit.c | |
parent | 69f7e96c5cdbaf65bdbbc4688e921a950832e20d (diff) |
generalize mask poll functions and sequencer mask code.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 82e2730c59e..92c0f785ccb 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -466,6 +466,33 @@ void recurs_sel_seq(Sequence *seqm) } } +int ED_space_sequencer_maskedit_mask_poll(bContext *C) +{ + /* in this case both funcs are the same, for clip editor not */ + return ED_space_sequencer_maskedit_poll(C); +} + +int ED_space_sequencer_check_show_maskedit(SpaceSeq *sseq, Scene *scene) +{ + if (sseq && sseq->mainb == SEQ_DRAW_IMG_IMBUF) { + return (BKE_sequencer_mask_get(scene) != NULL); + } + + return FALSE; +} + +int ED_space_sequencer_maskedit_poll(bContext *C) +{ + SpaceSeq *sseq = CTX_wm_space_seq(C); + + if (sseq) { + Scene *scene = CTX_data_scene(C); + return ED_space_sequencer_check_show_maskedit(sseq, scene); + } + + return FALSE; +} + int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequence **selseq1, Sequence **selseq2, Sequence **selseq3, const char **error_str) { Editing *ed = BKE_sequencer_editing_get(scene, FALSE); |