diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-02-14 18:30:09 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-02-25 13:15:42 +0300 |
commit | 5fd792c1f6d348411469d5b9744c55106d317375 (patch) | |
tree | 2e3880290bb4f514fe15048722a76f319bc9cca0 /source/blender/makesrna | |
parent | 60af7a349614f9ebe88ebb71f4c8fad14a0e274f (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
Note: This was committed only in master (3.2) by error.
Diffstat (limited to 'source/blender/makesrna')
-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 b4cf15ebfc6..7a5877ec4ce 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1629,12 +1629,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); |