diff options
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 83d8133a99e..45479c4253d 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -1515,6 +1515,11 @@ static int mode_set_exec(bContext *C, wmOperator *op) sc->mode = mode; + if (sc->mode == SC_MODE_MASKEDIT && sc->view != SC_VIEW_CLIP) { + /* Make sure we are in the right view for mask editing */ + sc->view = SC_VIEW_CLIP; + } + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_CLIP, NULL); return OPERATOR_FINISHED; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 2ba5e2ae68c..6dc0cf045cd 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2105,6 +2105,13 @@ static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain), { SpaceClip *sc = (SpaceClip *)(ptr->data); + if (sc->mode == SC_MODE_MASKEDIT && sc->view != SC_VIEW_CLIP) { + /* Make sure we are in the right view for mask editing */ + sc->view = SC_VIEW_CLIP; + ScrArea *sa = rna_area_from_space(ptr); + ED_area_tag_refresh(sa); + } + sc->scopes.ok = 0; } |