[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42495] trunk/blender/source/blender/ blenkernel/intern/DerivedMesh.c: remove initilaizing weight collor with dummy value (from recent commit), harmless but not needed.

Campbell Barton ideasman42 at gmail.com
Wed Dec 7 19:22:19 CET 2011


Revision: 42495
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42495
Author:   campbellbarton
Date:     2011-12-07 18:22:16 +0000 (Wed, 07 Dec 2011)
Log Message:
-----------
remove initilaizing weight collor with dummy value (from recent commit), harmless but not needed.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c

Modified: trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2011-12-07 17:28:42 UTC (rev 42494)
+++ trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2011-12-07 18:22:16 UTC (rev 42495)
@@ -641,7 +641,9 @@
 	CALC_WP_AUTO_NORMALIZE= (1<<1)
 };
 
-static void calc_weightpaint_vert_color(Object *ob, ColorBand *coba, int vert, unsigned char *col, char *dg_flags, int selected, int UNUSED(unselected), const int draw_flag)
+static void calc_weightpaint_vert_color(
+        Object *ob, ColorBand *coba, int vert, unsigned char *col,
+        const char *dg_flags, int selected, int UNUSED(unselected), const int draw_flag)
 {
 	Mesh *me = ob->data;
 	float input = 0.0f;
@@ -691,13 +693,9 @@
 		float colf[4];
 		CLAMP(input, 0.0f, 1.0f);
 
-		colf[0]= colf[1]= colf[2]= -1;
+		if(coba) do_colorband(coba, input, colf);
+		else     weight_to_rgb(colf, input);
 
-		if(coba)
-			do_colorband(coba, input, colf);
-		else
-			weight_to_rgb(colf, input);
-
 		col[3] = (unsigned char)(colf[0] * 255.0f);
 		col[2] = (unsigned char)(colf[1] * 255.0f);
 		col[1] = (unsigned char)(colf[2] * 255.0f);




More information about the Bf-blender-cvs mailing list