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>2019-09-11 13:27:47 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-09-11 13:28:23 +0300
commitef18b672f5a57d86d264af0f875a37c6a9c6677a (patch)
treee003422dc7945783e6dde1d927c8ed05fd412d96 /source/blender/editors/gpencil/gpencil_paint.c
parent7e61e597253f3ca75f2fb86a57212ca750ffbbe8 (diff)
GPencil: New Brush postprocesing Simplify
This option allows to apply a simplify when the stroke is completed. The simplify use the Adaptive option to keep the shape.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index d5c701488c9..0a4b068a926 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1235,6 +1235,13 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
reduce += 0.25f; /* reduce the factor */
}
}
+
+ /* Simplify adaptive */
+ if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
+ (brush->gpencil_settings->simplify_f > 0.0f)) {
+ BKE_gpencil_simplify_stroke(gps, brush->gpencil_settings->simplify_f);
+ }
+
/* smooth thickness */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
(brush->gpencil_settings->thick_smoothfac > 0.0f)) {