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>2012-10-29 07:53:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-29 07:53:02 +0400
commit99c6b53cbce1142bddf9d41329c5be2a386d9c13 (patch)
treeb5e91d9b423a549a6b48bf11cf483a442d48835b
parentdbb40e805d5712b5c6b5e6b546ca8d55abd75f5c (diff)
correct use_fast_update for vertex painting, it wasn't swapping red/blue as it should have.
(pointed out by Bastien Montagne in relation to [#33002]).
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index b8ac88f4d65..1fdbdd10d6d 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2632,14 +2632,6 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const fl
return 1;
}
-static void copy_lcol_to_mcol(MCol *mcol, const MLoopCol *lcol)
-{
- mcol->a = lcol->a;
- mcol->r = lcol->r;
- mcol->g = lcol->g;
- mcol->b = lcol->b;
-}
-
static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob,
const unsigned int index, const float mval[2],
const float brush_size_pressure, const float brush_alpha_pressure)
@@ -2707,10 +2699,10 @@ static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Object *ob,
ml = me->mloop + mpoly->loopstart;
mlc = me->mloopcol + mpoly->loopstart;
for (j = 0; j < mpoly->totloop; j++, ml++, mlc++) {
- if (ml->v == mf->v1) copy_lcol_to_mcol(mc + 0, mlc);
- else if (ml->v == mf->v2) copy_lcol_to_mcol(mc + 1, mlc);
- else if (ml->v == mf->v3) copy_lcol_to_mcol(mc + 2, mlc);
- else if (mf->v4 && ml->v == mf->v4) copy_lcol_to_mcol(mc + 3, mlc);
+ if (ml->v == mf->v1) { MESH_MLOOPCOL_TO_MCOL(mlc, mc + 0); }
+ else if (ml->v == mf->v2) { MESH_MLOOPCOL_TO_MCOL(mlc, mc + 1); }
+ else if (ml->v == mf->v3) { MESH_MLOOPCOL_TO_MCOL(mlc, mc + 2); }
+ else if (mf->v4 && ml->v == mf->v4) { MESH_MLOOPCOL_TO_MCOL(mlc, mc + 3); }
}
}