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 | |
parent | 69f7e96c5cdbaf65bdbbc4688e921a950832e20d (diff) |
generalize mask poll functions and sequencer mask code.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_draw.c | 3 | ||||
-rw-r--r-- | source/blender/editors/mask/mask_edit.c | 27 |
2 files changed, 19 insertions, 11 deletions
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index f378d5452a4..8503c538a8d 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -129,7 +129,8 @@ static void draw_spline_points(MaskLayer *masklay, MaskSpline *spline, if (!spline->tot_point) return; - hsize = UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE); + /* TODO, add this to sequence editor */ + hsize = 4; /* UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE); */ glPointSize(hsize); 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; } |