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/blenkernel/intern/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/blenkernel/intern/gpencil.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index c23429d86b7..f3eb5430bce 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -262,9 +262,12 @@ bGPDlayer *gpencil_layer_addnew(bGPdata *gpd, const char *name, bool setactive)
ARRAY_SET_ITEMS(gpl->gcolor_prev, 0.145098f, 0.419608f, 0.137255f); /* green */
ARRAY_SET_ITEMS(gpl->gcolor_next, 0.125490f, 0.082353f, 0.529412f); /* blue */
- /* HQ fill by default */
+ /* high quality fill by default */
gpl->flag |= GP_LAYER_HQ_FILL;
-
+
+ /* default smooth iterations */
+ gpl->draw_smoothlvl = 1;
+
/* auto-name */
BLI_strncpy(gpl->info, name, sizeof(gpl->info));
BLI_uniquename(&gpd->layers, gpl, DATA_("GP_Layer"), '.', offsetof(bGPDlayer, info), sizeof(gpl->info));