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:
authorAntonio Vazquez <blendergit@gmail.com>2020-08-05 18:44:04 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-08-05 18:46:34 +0300
commit8fc7c3539adec4eccc9b143147fb60c7c7936ef7 (patch)
tree6b9d3b09e00ccfafb3d483a57cc90e453230fef0 /source/blender/makesrna
parentf3acfc97d933b58c27580a7192d7bffc49e512e8 (diff)
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.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index efc712544ca..aa8f20d4c8a 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -243,6 +243,15 @@ static EnumPropertyItem rna_enum_gpencil_fill_draw_modes_items[] = {
{GP_FILL_DMODE_CONTROL, "CONTROL", 0, "Edit Lines", "Use edit lines as fill boundary limits"},
{0, NULL, 0, NULL, NULL}};
+static EnumPropertyItem rna_enum_gpencil_fill_layers_modes_items[] = {
+ {GP_FILL_GPLMODE_VISIBLE, "VISIBLE", 0, "Visible", "Visible layers"},
+ {GP_FILL_GPLMODE_ACTIVE, "ACTIVE", 0, "Active", "Only active layer"},
+ {GP_FILL_GPLMODE_ABOVE, "ABOVE", 0, "Layer Above", "Layer above active"},
+ {GP_FILL_GPLMODE_BELOW, "BELOW", 0, "Layer Below", "Layer below active"},
+ {GP_FILL_GPLMODE_ALL_ABOVE, "ALL_ABOVE", 0, "All Above", "All layers above active"},
+ {GP_FILL_GPLMODE_ALL_BELOW, "ALL_BELOW", 0, "All Below", "All layers below active"},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem rna_enum_gpencil_brush_modes_items[] = {
{GP_BRUSH_MODE_ACTIVE, "ACTIVE", 0, "Active", "Use current mode"},
{GP_BRUSH_MODE_MATERIAL, "MATERIAL", 0, "Material", "Use always material mode"},
@@ -1646,6 +1655,12 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Mode", "Mode to draw boundary limits");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ prop = RNA_def_property(srna, "fill_layer_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "fill_layer_mode");
+ RNA_def_property_enum_items(prop, rna_enum_gpencil_fill_layers_modes_items);
+ RNA_def_property_ui_text(prop, "Layer Mode", "Layers used as boundaries");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+
prop = RNA_def_property(srna, "brush_draw_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "brush_draw_mode");
RNA_def_property_enum_items(prop, rna_enum_gpencil_brush_modes_items);