diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-09-11 13:27:47 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-09-11 13:28:23 +0300 |
commit | ef18b672f5a57d86d264af0f875a37c6a9c6677a (patch) | |
tree | e003422dc7945783e6dde1d927c8ed05fd412d96 /source/blender/editors/gpencil/gpencil_paint.c | |
parent | 7e61e597253f3ca75f2fb86a57212ca750ffbbe8 (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.c | 7 |
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)) { |