[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51725] trunk/blender/source/blender/ editors/sculpt_paint/paint_vertex.c: correct use_fast_update for vertex painting, it wasn't swapping red/ blue as it should have.
Campbell Barton
ideasman42 at gmail.com
Mon Oct 29 04:53:07 CET 2012
Revision: 51725
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51725
Author: campbellbarton
Date: 2012-10-29 03:53:02 +0000 (Mon, 29 Oct 2012)
Log Message:
-----------
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]).
Modified Paths:
--------------
trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2012-10-29 03:36:55 UTC (rev 51724)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c 2012-10-29 03:53:02 UTC (rev 51725)
@@ -2632,14 +2632,6 @@
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 @@
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); }
}
}
More information about the Bf-blender-cvs
mailing list