From df2ab4e758c73bc72a95fcc02ac1e711bbd86b17 Mon Sep 17 00:00:00 2001 From: Simon Lenz Date: Thu, 16 Jun 2022 10:13:03 +0200 Subject: 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 --- source/blender/editors/space_clip/clip_editor.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source/blender/editors/space_clip') 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; +} + /** \} */ /* -------------------------------------------------------------------- */ -- cgit v1.2.3