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-10 12:25:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-10-10 12:38:52 +0300
commit0592ac09ffc90aba48b01051f064a688dd37788d (patch)
treefcf047223be0c688efff6bb05a72ab20796067c7 /source/blender
parent582fbda18faea33395f85a8924fae4c64f070ff3 (diff)
Correct logic for vertex paint smear
Swapping gave values from the state before the last. Thanks to @angavrilov for spotting.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 5ec75cbb138..dc51e6ad824 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2355,7 +2355,7 @@ struct VPaintData {
bool is_texbrush;
- /* Special storage for smear brush, avoid feedback loop - update each step and swap. */
+ /* Special storage for smear brush, avoid feedback loop - update each step. */
struct {
uint *color_prev;
uint *color_curr;
@@ -3009,7 +3009,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
swap_m4m4(vc->rv3d->persmat, mat);
if (vp->paint.brush->vertexpaint_tool == PAINT_BLEND_SMEAR) {
- SWAP(uint *, vpd->smear.color_curr, vpd->smear.color_prev);
+ memcpy(vpd->smear.color_prev, vpd->smear.color_curr, sizeof(uint) * ((Mesh *)ob->data)->totloop);
}
/* calculate pivot for rotation around seletion if needed */