[Bf-blender-cvs] [1a77b5fe7b6] soc-2017-vertex_paint: removed the redundant code

Darshan Kadu noreply at git.blender.org
Thu Jun 29 11:05:00 CEST 2017


Commit: 1a77b5fe7b68bc17cdbc0ff290018b2409fd211d
Author: Darshan Kadu
Date:   Thu Jun 29 14:34:12 2017 +0530
Branches: soc-2017-vertex_paint
https://developer.blender.org/rB1a77b5fe7b68bc17cdbc0ff290018b2409fd211d

removed the redundant code

===================================================================

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 6112fec5cca..25ffd312ced 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -4600,18 +4600,16 @@ static bool weight_to_vert_convert(Object *ob)
 	vgroup_active = ob->actdef - 1;
 	for (int i = 0; i < me->totpoly; i++, mp++) {
 		MLoopCol *lcol = &me->mloopcol[mp->loopstart];
-		unsigned int fidx = mp->totloop - 1,j = 0;
+		unsigned int j = 0;
 		do{
 			unsigned int vidx = me->mloop[mp->loopstart + j].v;
-			if (1) {
-				const float weight = defvert_find_weight(&me->dvert[vidx], vgroup_active);
-				lcol->r = (-1.0f * weight +1) * 255;
-				lcol->b = (-1.0f * weight + 1) * 255;
-				lcol->g = (-1.0f * weight + 1) * 255;
-			}
+			const float weight = defvert_find_weight(&me->dvert[vidx], vgroup_active);
+			lcol->r = (-1.0f * weight +1) * 255;
+			lcol->b = (-1.0f * weight + 1) * 255;
+			lcol->g = (-1.0f * weight + 1) * 255;
 			lcol++;
 			j++;
-		} while (j <= fidx);
+		} while (j <= mp->totloop - 1);
 	}
 	return true;
 }




More information about the Bf-blender-cvs mailing list