Commit: 28142f5fa537a492dbb788d3c1aef306ef78f233 Author: Antonio Vazquez Date: Mon Nov 13 19:31:40 2017 +0100 Branches: greasepencil-object https://developer.blender.org/rB28142f5fa537a492dbb788d3c1aef306ef78f233
WIP: More work in smooth process =================================================================== M source/blender/editors/gpencil/gpencil_paint.c M source/blender/modifiers/intern/MOD_gpencilsmooth.c =================================================================== diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 394dcb59b89..26a2217f9a3 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1138,8 +1138,11 @@ static void gp_stroke_newfrombuffer(tGPsdata *p) for (int r = 0; r < brush->draw_smoothlvl; ++r) { for (i = 0; i < gps->totpoints; i++) { BKE_gp_smooth_stroke(gps, i, brush->draw_smoothfac - reduce, false); - BKE_gp_smooth_stroke_strength(gps, i, brush->draw_smoothfac - reduce); - BKE_gp_smooth_stroke_thickness(gps, i, brush->draw_smoothfac - reduce); + BKE_gp_smooth_stroke_strength(gps, i, brush->draw_smoothfac); + /* thickness needs to repeat process several times */ + for (int r2 = 0; r2 < 10; ++r2) { + BKE_gp_smooth_stroke_thickness(gps, i, brush->draw_smoothfac); + } } reduce += 0.25f; // reduce the factor } diff --git a/source/blender/modifiers/intern/MOD_gpencilsmooth.c b/source/blender/modifiers/intern/MOD_gpencilsmooth.c index d9fde45f7e1..38791383c04 100644 --- a/source/blender/modifiers/intern/MOD_gpencilsmooth.c +++ b/source/blender/modifiers/intern/MOD_gpencilsmooth.c @@ -104,8 +104,11 @@ static void deformStroke(ModifierData *md, const EvaluationContext *UNUSED(eval_ if (mmd->flag & GP_SMOOTH_MOD_STRENGTH) { BKE_gp_smooth_stroke_strength(gps, i, val); } - if (mmd->flag & GP_SMOOTH_MOD_THICKNESS) { - BKE_gp_smooth_stroke_thickness(gps, i, val); + if ((mmd->flag & GP_SMOOTH_MOD_THICKNESS) && (val > 0)) { + /* thickness need to repeat process several times */ + for (int r2 = 0; r2 < r * 10; ++r2) { + BKE_gp_smooth_stroke_thickness(gps, i, val); + } } } } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs