diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-10 12:25:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-10 12:38:52 +0300 |
commit | 0592ac09ffc90aba48b01051f064a688dd37788d (patch) | |
tree | fcf047223be0c688efff6bb05a72ab20796067c7 /source/blender/editors/sculpt_paint | |
parent | 582fbda18faea33395f85a8924fae4c64f070ff3 (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/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 4 |
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 */ |