Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-10-03 12:19:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-03 12:19:59 +0300
commit975ed05edbeee351661d05f3969af69dc7699b9c (patch)
tree5d37d67d7acc31c1a50f496d4a82493bda01060f /source/blender
parent7640d5e92aac588101719574c7d0ee36baac6416 (diff)
Vertex Paint: smear got wrong last-location
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c4
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c1
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);