diff options
author | Antonioya <blendergit@gmail.com> | 2019-04-15 11:32:06 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-04-15 11:32:25 +0300 |
commit | 240940c58ca3ce65e4bbceebea71dd9d1c2c08bc (patch) | |
tree | 97a9c60a7c2e059cef2541667ade5e00c70c21f5 /source/blender/makesrna/intern/rna_brush.c | |
parent | 7c79455297d818a94aab2a9be5807b4d9ca43827 (diff) |
GPencil: New Dots gradient
This commit adds support for drawing Dots strokes with a gradient factor to get artistic effects like watercolor.
Currently, the option is only supported by Dots materials, and in the future will be added to line strokes, but now there is a limitation on drawing engine and we will keep disabled on Line materials.
Also, added the option to align Dots and Boxes strokes textures aligned with the drawing path to get more fluid strokes.
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index ce5b18331c6..23ae314f885 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1197,6 +1197,25 @@ static void rna_def_gpencil_options(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); + /* gradient control */ + prop = RNA_def_property(srna, "gradient_factor", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "gradient_f"); + RNA_def_property_range(prop, 0.001f, 1.0f); + RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_ui_text( + prop, "Border Opacity Factor", + "Amount of gradient for Dot strokes (set to 1 for full solid)"); + RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); + + /* gradient shape ratio */ + prop = RNA_def_property(srna, "gradient_shape", PROP_FLOAT, PROP_XYZ); + RNA_def_property_float_sdna(prop, NULL, "gradient_s"); + RNA_def_property_array(prop, 2); + RNA_def_property_range(prop, 0.01f, 1.0f); + RNA_def_property_float_default(prop, 1.0f); + RNA_def_property_ui_text(prop, "Aspect Ratio", ""); + RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); + prop = RNA_def_property(srna, "input_samples", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "input_samples"); RNA_def_property_range(prop, 0, GP_MAX_INPUT_SAMPLES); |