Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Lenz <Amudtogal>2022-06-16 11:13:03 +0300
committerSergey Sharybin <sergey@blender.org>2022-06-22 11:45:18 +0300
commitdf2ab4e758c73bc72a95fcc02ac1e711bbd86b17 (patch)
treed494bf031041336e05aa7cbb4c4a2064da39f420 /source/blender/editors/space_image
parent5946ea938a07bf95c7682af919ee33c715e1fa42 (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_image')
-rw-r--r--source/blender/editors/space_image/image_edit.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c
index e851b99d3ba..950acd77f6a 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -483,6 +483,16 @@ bool ED_space_image_maskedit_poll(bContext *C)
return false;
}
+bool ED_space_image_maskedit_visible_splines_poll(bContext *C)
+{
+ if (!ED_space_image_maskedit_poll(C)) {
+ return false;
+ }
+
+ const SpaceImage *space_image = CTX_wm_space_image(C);
+ return space_image->mask_info.draw_flag & MASK_DRAWFLAG_SPLINE;
+}
+
bool ED_space_image_paint_curve(const bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
@@ -508,6 +518,16 @@ bool ED_space_image_maskedit_mask_poll(bContext *C)
return false;
}
+bool ED_space_image_maskedit_mask_visible_splines_poll(bContext *C)
+{
+ if (!ED_space_image_maskedit_mask_poll(C)) {
+ return false;
+ }
+
+ const SpaceImage *space_image = CTX_wm_space_image(C);
+ return space_image->mask_info.draw_flag & MASK_DRAWFLAG_SPLINE;
+}
+
bool ED_space_image_cursor_poll(bContext *C)
{
return ED_operator_uvedit_space_image(C) || ED_space_image_maskedit_poll(C) ||