[Bf-blender-cvs] [0592ac09ffc] master: Correct logic for vertex paint smear
Campbell Barton
noreply at git.blender.org
Tue Oct 10 11:37:53 CEST 2017
Commit: 0592ac09ffc90aba48b01051f064a688dd37788d
Author: Campbell Barton
Date: Tue Oct 10 20:25:11 2017 +1100
Branches: master
https://developer.blender.org/rB0592ac09ffc90aba48b01051f064a688dd37788d
Correct logic for vertex paint smear
Swapping gave values from the state before the last.
Thanks to @angavrilov for spotting.
===================================================================
M source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
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 */
More information about the Bf-blender-cvs
mailing list