diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-02-14 18:30:09 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-02-14 18:30:09 +0300 |
commit | 3b14224881958297d88b70050ddae93d19c3f244 (patch) | |
tree | 3d8774e043d62bc41e00de48a2afc0b149a2589b /source/blender/makesrna/intern/rna_brush.c | |
parent | 15141ec19ae54a0f087405e1d0ddba899daf886d (diff) |
GPencil: Fill Dilate using negative values contract the fill area
This is requested by artist for some animation styles where is necessary to fill the area, but create a gap between fill and stroke.
Also some code cleanup and fix a bug in dilate for top area.
Reviewed By: pepeland, mendio
Differential Revision: https://developer.blender.org/D14082
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 7ba2b3a4502..f3c7d2747ac 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1615,12 +1615,13 @@ static void rna_def_gpencil_options(BlenderRNA *brna) prop, "Stroke Extension", "Strokes end extension for closing gaps, use zero to disable"); RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); - /* Number of pixels to dilate fill area. */ + /* Number of pixels to dilate fill area. Negative values contract the filled area. */ prop = RNA_def_property(srna, "dilate", PROP_INT, PROP_PIXEL); RNA_def_property_int_sdna(prop, NULL, "dilate_pixels"); - RNA_def_property_range(prop, 0, 20); + RNA_def_property_range(prop, -40, 40); RNA_def_property_int_default(prop, 1); - RNA_def_property_ui_text(prop, "Dilate", "Number of pixels to dilate fill area"); + RNA_def_property_ui_text( + prop, "Dilate/Contract", "Number of pixels to expand or contract fill area"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); |