From 975ed05edbeee351661d05f3969af69dc7699b9c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 3 Oct 2017 20:19:59 +1100 Subject: [PATCH] Vertex Paint: smear got wrong last-location --- source/blender/editors/sculpt_paint/paint_vertex.c | 4 ++-- source/blender/editors/sculpt_paint/sculpt.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 547cd9566e4..9ab4e816010 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1584,7 +1584,7 @@ static void do_wpaint_brush_smear_task_cb_ex( sub_v3_v3v3(brush_dir, cache->location, cache->last_location); project_plane_v3_v3v3(brush_dir, brush_dir, cache->view_normal); - if (normalize_v3(brush_dir) != 0.0f) { + if (cache->is_last_valid && (normalize_v3(brush_dir) != 0.0f)) { SculptBrushTest test; SculptBrushTestFn sculpt_brush_test_sq_fn = @@ -2661,7 +2661,7 @@ static void do_vpaint_brush_smear_task_cb_ex( sub_v3_v3v3(brush_dir, cache->location, cache->last_location); project_plane_v3_v3v3(brush_dir, brush_dir, cache->view_normal); - if (normalize_v3(brush_dir) != 0.0f) { + if (cache->is_last_valid && (normalize_v3(brush_dir) != 0.0f)) { SculptBrushTest test; SculptBrushTestFn sculpt_brush_test_sq_fn = diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index e8ea7f6709c..961fac287c1 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3598,6 +3598,7 @@ void sculpt_cache_calc_brushdata_symm( const char axis, const float angle) { flip_v3_v3(cache->location, cache->true_location, symm); + flip_v3_v3(cache->last_location, cache->true_last_location, symm); flip_v3_v3(cache->grab_delta_symmetry, cache->grab_delta, symm); flip_v3_v3(cache->view_normal, cache->true_view_normal, symm);