diff options
author | Simon Lenz <Amudtogal> | 2022-06-16 11:13:03 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-06-22 11:45:18 +0300 |
commit | df2ab4e758c73bc72a95fcc02ac1e711bbd86b17 (patch) | |
tree | d494bf031041336e05aa7cbb4c4a2064da39f420 /source/blender/editors/space_clip/clip_editor.c | |
parent | 5946ea938a07bf95c7682af919ee33c715e1fa42 (diff) |
Mask Editor: Add toggle for mask spline drawing
Adds an overlay option to show/hide the spline points & lines of masks in the Mask Editor.
It also moves the "smooth" option up (its position left of the selection dropdown was missleading).
{F11847272}
This emerged from a discussion in https://developer.blender.org/D12776
Differential Revision: https://developer.blender.org/D13314
Diffstat (limited to 'source/blender/editors/space_clip/clip_editor.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 0b4eec4a835..cf7c3b51ae3 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -102,6 +102,16 @@ bool ED_space_clip_maskedit_poll(bContext *C) return false; } +bool ED_space_clip_maskedit_visible_splines_poll(bContext *C) +{ + if (!ED_space_clip_maskedit_poll(C)) { + return false; + } + + const SpaceClip *space_clip = CTX_wm_space_clip(C); + return space_clip->mask_info.draw_flag & MASK_DRAWFLAG_SPLINE; +} + bool ED_space_clip_maskedit_mask_poll(bContext *C) { if (ED_space_clip_maskedit_poll(C)) { @@ -117,6 +127,16 @@ bool ED_space_clip_maskedit_mask_poll(bContext *C) return false; } +bool ED_space_clip_maskedit_mask_visible_splines_poll(bContext *C) +{ + if (!ED_space_clip_maskedit_mask_poll(C)) { + return false; + } + + const SpaceClip *space_clip = CTX_wm_space_clip(C); + return space_clip->mask_info.draw_flag & MASK_DRAWFLAG_SPLINE; +} + /** \} */ /* -------------------------------------------------------------------- */ |