Commit: 975ed05edbeee351661d05f3969af69dc7699b9c
Author: Campbell Barton
Date:   Tue Oct 3 20:19:59 2017 +1100
Branches: master
https://developer.blender.org/rB975ed05edbeee351661d05f3969af69dc7699b9c

Vertex Paint: smear got wrong last-location

===================================================================

M       source/blender/editors/sculpt_paint/paint_vertex.c
M       source/blender/editors/sculpt_paint/sculpt.c

===================================================================

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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to