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>2016-05-08 04:38:54 +0300
committerJoshua Leung <aligorith@gmail.com>2016-05-08 15:53:51 +0300
commit9dbe7bbe9a943ffd18fa670c4f68b4f90a6fc773 (patch)
treed2b62543842dbe02f796cedaa0e6d78f62126b81 /source/blender/makesrna/intern/rna_gpencil.c
parentdc78e47b770b33645f3cda1a4750422cd5105d6b (diff)
D1886: GPencil - Add smooth iterations parameter to get better quality
After some test, a new iteration parameter has been added in order to apply repetitive smoothing to the stroke. By default 1 iteration is applied, but can used any number between 1 and 3. The repetition uses different levels of intensity from 100% of the defined smooth factor for the first loop, 50% for the second and 25% for the third. We use in each loop a smaller value in order to avoid deform too much the stroke.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 10d7efe9374..0aebca8f56b 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -810,6 +810,13 @@ static void rna_def_gpencil_layer(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Smooth", "Amount of smoothing to apply to newly created strokes, to reduce jitter/noise");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
+ /* Iterations of the Smoothing factor */
+ prop = RNA_def_property(srna, "pen_smooth_steps", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "draw_smoothlvl");
+ RNA_def_property_range(prop, 1, 3);
+ RNA_def_property_ui_text(prop, "Iterations", "Number of times to smooth newly created strokes [+ reason/effect of using higher values of this property]");
+ RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
+
/* Subdivision level for new strokes */
prop = RNA_def_property(srna, "pen_subdivision_steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sublevel");