[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40821] trunk/blender/source/blender/ editors/sculpt_paint/paint_vertex.c: remove unused struct member & minor edits, no functional change.

Campbell Barton ideasman42 at gmail.com
Thu Oct 6 06:33:01 CEST 2011


Revision: 40821
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40821
Author:   campbellbarton
Date:     2011-10-06 04:33:00 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
remove unused struct member & minor edits, no functional change.

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	2011-10-06 04:09:48 UTC (rev 40820)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2011-10-06 04:33:00 UTC (rev 40821)
@@ -290,7 +290,7 @@
 }
 
 /* mirror_vgroup is set to -1 when invalid */
-static void wpaint_mirror_vgroup_ensure(Object *ob, int *vgroup_mirror)
+static int wpaint_mirror_vgroup_ensure(Object *ob)
 {
 	bDeformGroup *defgroup= BLI_findlink(&ob->defbase, ob->actdef - 1);
 
@@ -317,13 +317,12 @@
 			/* curdef should never be NULL unless this is
 			 * a  lamp and ED_vgroup_add_name fails */
 			if(curdef) {
-				*vgroup_mirror= mirrdef;
-				return;
+				return mirrdef;
 			}
 		}
 	}
 
-	*vgroup_mirror= -1;
+	return -1;
 }
 
 static void copy_vpaint_prev(VPaint *vp, unsigned int *mcol, int tot)
@@ -424,9 +423,9 @@
 	
 	vgroup= ob->actdef-1;
 
-	/* if mirror painting, find the other group */		
+	/* if mirror painting, find the other group */
 	if(me->editflag & ME_EDIT_MIRROR_X) {
-		wpaint_mirror_vgroup_ensure(ob, &vgroup_mirror);
+		vgroup_mirror= wpaint_mirror_vgroup_ensure(ob);
 	}
 	
 	copy_wpaint_prev(wp, me->dvert, me->totvert);
@@ -1806,7 +1805,6 @@
 	float wpimat[3][3];
 	
 	/*variables for auto normalize*/
-	int auto_normalize;
 	char *vgroup_validmap; /*stores if vgroups tie to deforming bones or not*/
 	char *lock_flags;
 	int defbase_tot;
@@ -1831,8 +1829,6 @@
 		BLI_ghash_insert(gh, dg->name, NULL);
 	}
 
-	vgroup_validmap= MEM_callocN(BLI_ghash_size(gh), "wpaint valid map");
-
 	/*now loop through the armature modifiers and identify deform bones*/
 	for (md = ob->modifiers.first; md; md= !md->next && step1 ? (step1=0), modifiers_getVirtualModifierList(ob) : md->next) {
 		if (!(md->mode & (eModifierMode_Realtime|eModifierMode_Virtual)))
@@ -1857,12 +1853,12 @@
 			}
 		}
 	}
-	
+
+	vgroup_validmap= MEM_mallocN(BLI_ghash_size(gh), "wpaint valid map");
+
 	/*add all names to a hash table*/
 	for (dg=ob->defbase.first, i=0; dg; dg=dg->next, i++) {
-		if (BLI_ghash_lookup(gh, dg->name) != NULL) {
-			vgroup_validmap[i] = TRUE;
-		}
+		vgroup_validmap[i]= (BLI_ghash_lookup(gh, dg->name) != NULL);
 	}
 
 	BLI_ghash_free(gh, NULL, NULL);
@@ -1900,10 +1896,9 @@
 	
 	/*set up auto-normalize, and generate map for detecting which
 	  vgroups affect deform bones*/
-	wpd->auto_normalize = ts->auto_normalize;
 	wpd->defbase_tot = BLI_countlist(&ob->defbase);
 	wpd->lock_flags = gen_lock_flags(ob, wpd->defbase_tot);
-	if (wpd->auto_normalize || ts->multipaint || wpd->lock_flags) {
+	if (ts->auto_normalize || ts->multipaint || wpd->lock_flags) {
 		wpd->vgroup_validmap = wpaint_make_validmap(ob);
 	}
 
@@ -1942,7 +1937,7 @@
 	
 	/* if mirror painting, find the other group */
 	if(me->editflag & ME_EDIT_MIRROR_X) {
-		wpaint_mirror_vgroup_ensure(ob, &wpd->vgroup_mirror);
+		wpd->vgroup_mirror= wpaint_mirror_vgroup_ensure(ob);
 	}
 	
 	return 1;




More information about the Bf-blender-cvs mailing list