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-10 17:34:19 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-08-10 17:34:26 +0300
commit4ada2909566c6966607d3a4d78964902ad9e19a6 (patch)
tree6cd8ecfe1fd285de529e87db9b095be763c7cd20 /source/blender/makesrna/intern/rna_brush.c
parent3fe2fceb4e35704a756ef064b2f4a289a6843261 (diff)
GPencil: Invert Filled area pressing Ctrl key
This feature was suggested in https://blender.community/c/rightclickselect/rggbbc/ When press `Ctrl+LMB`, the filled area is inverted. {F8749306} {F8749307} Filling several areas: {F8759399} Differential Revision: https://developer.blender.org/D8477
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 11b563dae52..ca90483926f 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -252,6 +252,12 @@ static EnumPropertyItem rna_enum_gpencil_fill_layers_modes_items[] = {
{GP_FILL_GPLMODE_ALL_BELOW, "ALL_BELOW", 0, "All Below", "All layers below active"},
{0, NULL, 0, NULL, NULL}};
+static EnumPropertyItem rna_enum_gpencil_fill_direction_items[] = {
+ {0, "NORMAL", ICON_ADD, "Normal", "Fill internal area"},
+ {BRUSH_DIR_IN, "INVERT", ICON_REMOVE, "Inverted", "Fill inverted area"},
+ {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"},
@@ -1661,6 +1667,12 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
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, "fill_direction", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "fill_direction");
+ RNA_def_property_enum_items(prop, rna_enum_gpencil_fill_direction_items);
+ RNA_def_property_ui_text(prop, "Direction", "Direction of the fill");
+ 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);