From 794836c8f17a2feaa43d31d23982fa41e3f953a4 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Tue, 21 Aug 2018 18:50:03 +0200 Subject: [PATCH] GP: Recalc fill triangulation in sculpt mode In some extreme modifications the fill triangulation cannot be right, so need a refresh. This is done only for sculpt brushes that can change the geometry. --- source/blender/editors/gpencil/gpencil_brush.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index d8be0dd665a..ddce148a3a3 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -313,6 +313,8 @@ static bool gp_brush_smooth_apply( BKE_gpencil_smooth_stroke_uv(gps, pt_index, inf); } + gps->flag |= GP_STROKE_RECALC_CACHES; + return true; } @@ -528,6 +530,7 @@ static void gp_brush_grab_apply_cached( /* compute lock axis */ gpsculpt_compute_lock_axis(gso, pt, save_pt); } + gps->flag |= GP_STROKE_RECALC_CACHES; } /* free customdata used for handling this stroke */ @@ -567,6 +570,8 @@ static bool gp_brush_push_apply( /* compute lock axis */ gpsculpt_compute_lock_axis(gso, pt, save_pt); + gps->flag |= GP_STROKE_RECALC_CACHES; + /* done */ return true; } @@ -652,6 +657,8 @@ static bool gp_brush_pinch_apply( /* compute lock axis */ gpsculpt_compute_lock_axis(gso, pt, save_pt); + gps->flag |= GP_STROKE_RECALC_CACHES; + /* done */ return true; } @@ -732,6 +739,8 @@ static bool gp_brush_twist_apply( } } + gps->flag |= GP_STROKE_RECALC_CACHES; + /* done */ return true; } @@ -854,6 +863,8 @@ static bool gp_brush_randomize_apply( CLAMP(pt->uv_rot, -M_PI_2, M_PI_2); } + gps->flag |= GP_STROKE_RECALC_CACHES; + /* done */ return true; }