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/mask/mask_edit.c | |
parent | 69f7e96c5cdbaf65bdbbc4688e921a950832e20d (diff) |
generalize mask poll functions and sequencer mask code.
Diffstat (limited to 'source/blender/editors/mask/mask_edit.c')
-rw-r--r-- | source/blender/editors/mask/mask_edit.c | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index b9522540e67..3ba198b60be 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -44,6 +44,7 @@ #include "ED_mask.h" /* own include */ #include "ED_object.h" /* ED_keymap_proportional_maskmode only */ #include "ED_clip.h" +#include "ED_sequencer.h" #include "ED_transform.h" #include "RNA_access.h" @@ -54,23 +55,29 @@ int ED_maskedit_poll(bContext *C) { - SpaceClip *sc = CTX_wm_space_clip(C); - - if (sc) { - return ED_space_clip_maskedit_poll(C); + ScrArea *sa = CTX_wm_area(C); + if (sa) { + switch (sa->spacetype) { + case SPACE_CLIP: + return ED_space_clip_maskedit_poll(C); + case SPACE_SEQ: + return ED_space_sequencer_maskedit_poll(C); + } } - return FALSE; } int ED_maskedit_mask_poll(bContext *C) { - SpaceClip *sc = CTX_wm_space_clip(C); - - if (sc) { - return ED_space_clip_maskedit_mask_poll(C); + ScrArea *sa = CTX_wm_area(C); + if (sa) { + switch (sa->spacetype) { + case SPACE_CLIP: + return ED_space_clip_maskedit_mask_poll(C); + case SPACE_SEQ: + return ED_space_sequencer_maskedit_mask_poll(C); + } } - return FALSE; } |