From 8fc7c3539adec4eccc9b143147fb60c7c7936ef7 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Wed, 5 Aug 2020 17:44:04 +0200 Subject: GPencil: Add Fill option to determine the layers used for boundary strokes This is a patch suggested in https://blender.community/c/rightclickselect/qggbbc/ The valid values are: * Visible Layers. * Active Layer. * Layer Above active. * Layer Below active. * All layers Above active. * All layers Below active. Differential Revision: https://developer.blender.org/D8474 Some minor UI changes done in the original patch. --- source/blender/makesdna/DNA_brush_types.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source/blender/makesdna/DNA_brush_types.h') diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index 000b61fb39b..6d56db4b0e0 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -67,7 +67,9 @@ typedef struct BrushGpencilSettings { short draw_smoothlvl; /** Number of times to subdivide new strokes. */ short draw_subdivide; - char _pad[4]; + /** Layers used for fill. */ + short fill_layer_mode; + char _pad[2]; /** Factor for transparency. */ float fill_threshold; @@ -252,6 +254,16 @@ typedef enum eGP_FillDrawModes { GP_FILL_DMODE_CONTROL = 2, } eGP_FillDrawModes; +/* BrushGpencilSettings->fill_layer_mode */ +typedef enum eGP_FillLayerModes { + GP_FILL_GPLMODE_VISIBLE = 0, + GP_FILL_GPLMODE_ACTIVE = 1, + GP_FILL_GPLMODE_ALL_ABOVE = 2, + GP_FILL_GPLMODE_ALL_BELOW = 3, + GP_FILL_GPLMODE_ABOVE = 4, + GP_FILL_GPLMODE_BELOW = 5, +} eGP_FillLayerModes; + /* BrushGpencilSettings->gp_eraser_mode */ typedef enum eGP_BrushEraserMode { GP_BRUSH_ERASER_SOFT = 0, -- cgit v1.2.3