[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40464] branches/bmesh/blender: svn merge ^/trunk/blender -r40368:40370

Campbell Barton ideasman42 at gmail.com
Thu Sep 22 18:17:28 CEST 2011


Revision: 40464
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40464
Author:   campbellbarton
Date:     2011-09-22 16:17:27 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
svn merge ^/trunk/blender -r40368:40370

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40368

Modified Paths:
--------------
    branches/bmesh/blender/build_files/cmake/config/blender_lite.cmake
    branches/bmesh/blender/source/blender/blenkernel/intern/sound.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_utils.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_vertex.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/
    branches/bmesh/blender/source/blender/editors/space_outliner/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:39992-40368
   + /trunk/blender:39992-40370

Modified: branches/bmesh/blender/build_files/cmake/config/blender_lite.cmake
===================================================================
--- branches/bmesh/blender/build_files/cmake/config/blender_lite.cmake	2011-09-22 16:09:27 UTC (rev 40463)
+++ branches/bmesh/blender/build_files/cmake/config/blender_lite.cmake	2011-09-22 16:17:27 UTC (rev 40464)
@@ -1,4 +1,4 @@
-# turn everything OFF CACHE FORCE BOOL) except for python which defaults to ON
+# turn everything OFF except for python which defaults to ON
 # and is needed for the UI
 #
 # Example usage:


Property changes on: branches/bmesh/blender/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release:31524-40368
   + /trunk/blender/release:31524-40370

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/sound.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/sound.c	2011-09-22 16:09:27 UTC (rev 40463)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/sound.c	2011-09-22 16:17:27 UTC (rev 40464)
@@ -1,5 +1,5 @@
 /*
- * $Id:
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *

Modified: branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_utils.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_utils.c	2011-09-22 16:09:27 UTC (rev 40463)
+++ branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_utils.c	2011-09-22 16:17:27 UTC (rev 40464)
@@ -1,5 +1,5 @@
 /*
- * $Id:
+ * $Id$
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *

Modified: branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2011-09-22 16:09:27 UTC (rev 40463)
+++ branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_vertex.c	2011-09-22 16:17:27 UTC (rev 40464)
@@ -1256,12 +1256,13 @@
 	if(is_locked){
 		return lock_flags;
 	}
-	// don't forget to free it if it is unneeded
+
 	MEM_freeN(lock_flags);
 	return NULL;
 }
 
-static int has_locked_group_selected(int defbase_tot, char *defbase_sel, char *lock_flags) {
+static int has_locked_group_selected(int defbase_tot, char *defbase_sel, char *lock_flags)
+{
 	int i;
 	for(i = 0; i < defbase_tot; i++) {
 		if(defbase_sel[i] && lock_flags[i]) {
@@ -1273,7 +1274,8 @@
 
 
 #if 0 /* UNUSED */
-static int has_unselected_unlocked_bone_group(int defbase_tot, char *defbase_sel, int selected, char *lock_flags, char *vgroup_validmap) {
+static int has_unselected_unlocked_bone_group(int defbase_tot, char *defbase_sel, int selected, char *lock_flags, char *vgroup_validmap)
+{
 	int i;
 	if(defbase_tot == selected) {
 		return FALSE;
@@ -1288,28 +1290,32 @@
 #endif
 
 
-static void multipaint_selection(MDeformVert *dvert, float change, char *defbase_sel, int defbase_tot) {
+static void multipaint_selection(MDeformVert *dvert, float change, char *defbase_sel, int defbase_tot)
+{
 	int i;
 	MDeformWeight *dw;
 	float val;
-	// make sure they are all at most 1 after the change
+	/* make sure they are all at most 1 after the change */
 	for(i = 0; i < defbase_tot; i++) {
 		if(defbase_sel[i]) {
 			dw = defvert_find_index(dvert, i);
 			if(dw && dw->weight) {
 				val = dw->weight * change;
 				if(val > 1) {
-					/*  TODO: when the change is reduced, you need to recheck the earlier values to make sure they are not 0 (precision error) */
+					/* TODO: when the change is reduced, you need to recheck
+					 * the earlier values to make sure they are not 0
+					 * (precision error) */
 					change = 1.0f/dw->weight;
 				}
-				// the value should never reach zero while multi-painting if it was nonzero beforehand
+				/* the value should never reach zero while multi-painting if it
+				 * was nonzero beforehand */
 				if(val <= 0) {
 					return;
 				}
 			}
 		}
 	}
-	// apply the valid change
+	/* apply the valid change */
 	for(i = 0; i < defbase_tot; i++) {
 		if(defbase_sel[i]) {
 			dw = defvert_find_index(dvert, i);
@@ -1320,56 +1326,60 @@
 	}
 }
 
-// move all change onto valid, unchanged groups.  If there is change left over, then return it.
-// assumes there are valid groups to shift weight onto
-static float redistribute_change(MDeformVert *ndv, char *change_status, int changeme, int changeto, const char *vgroup_validmap, float totchange, float total_valid, char do_auto_normalize) {
+/* move all change onto valid, unchanged groups.  If there is change left over,
+ * then return it.
+ * assumes there are valid groups to shift weight onto */
+static float redistribute_change(MDeformVert *ndv, char *change_status, int changeme, int changeto, float totchange, float total_valid, char do_auto_normalize)
+{
 	float was_change;
 	float change;
 	float oldval;
 	MDeformWeight *ndw;
 	int i;
 	do {
-		// assume there is no change until you see one
+		/* assume there is no change until you see one */
 		was_change = FALSE;
-		// change each group by the same amount each time
+		/* change each group by the same amount each time */
 		change = totchange/total_valid;
 		for(i = 0; i < ndv->totweight && total_valid && totchange; i++) {
 			ndw = (ndv->dw+i);
-			// change only the groups with a valid status
+			/* change only the groups with a valid status */
 			if(change_status[ndw->def_nr] == changeme) {
 				oldval = ndw->weight;
-				// if auto normalize is active, don't worry about upper bounds
+				/* if auto normalize is active, don't worry about upper bounds */
 				if(do_auto_normalize == FALSE && ndw->weight + change > 1) {
 					totchange -= 1-ndw->weight;
 					ndw->weight = 1;
-					// stop the changes to this group
+					/* stop the changes to this group */
 					change_status[ndw->def_nr] = changeto;
 					total_valid--;
-				} else if(ndw->weight + change < 0) { // check the lower bound
+				}
+				else if(ndw->weight + change < 0) { /* check the lower bound */
 					totchange -= ndw->weight;
 					ndw->weight = 0;
 					change_status[ndw->def_nr] = changeto;
 					total_valid--;
-				} else {// a perfectly valid change occurred to ndw->weight
+				}
+				else {/* a perfectly valid change occurred to ndw->weight */
 					totchange -= change;
 					ndw->weight += change;
 				}
-				// see if there was a change
+				/* see if there was a change */
 				if(oldval != ndw->weight) {
 					was_change = TRUE;
 				}
 			}
 		}
-	// don't go again if there was no change, if there is no valid group, or there is no change left
-	}while(was_change && total_valid && totchange);
-	// left overs
-	(void)vgroup_validmap;
+		/* don't go again if there was no change, if there is no valid group,
+		 * or there is no change left */
+	} while(was_change && total_valid && totchange);
+	/* left overs */
 	return totchange;
 }
 
-// observe the changes made to the weights of groups.
-// make sure all locked groups on the vertex have the same deformation
-// by moving the changes made to groups onto other unlocked groups
+/* observe the changes made to the weights of groups.
+ * make sure all locked groups on the vertex have the same deformation
+ * by moving the changes made to groups onto other unlocked groups */
 static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, int defbase_tot,
                           const char *lock_flags, const char *vgroup_validmap, char do_auto_normalize)
 {
@@ -1393,29 +1403,29 @@
 	if(!lock_flags || !has_locked_group(ndv, lock_flags)) {
 		return;
 	}
-	// record if a group was changed, unlocked and not changed, or locked
+	/* record if a group was changed, unlocked and not changed, or locked */
 	change_status = MEM_callocN(sizeof(char)*defbase_tot, "unlocked_unchanged");
 
 	for(i = 0; i < defbase_tot; i++) {
 		ndw = defvert_find_index(ndv, i);
 		odw = defvert_find_index(odv, i);
-		// the weights are zero, so we can assume a lot
+		/* the weights are zero, so we can assume a lot */
 		if(!ndw || !odw) {
 			if (!lock_flags[i] && vgroup_validmap[i]){
 				defvert_verify_index(odv, i);
 				defvert_verify_index(ndv, i);
 				total_valid++;
-				change_status[i] = 1; // can be altered while redistributing
+				change_status[i] = 1; /* can be altered while redistributing */
 			}
 			continue;
 		}
-		// locked groups should not be changed
+		/* locked groups should not be changed */
 		if(lock_flags[i]) {
 			ndw->weight = odw->weight;
 		}
-		else if(ndw->weight != odw->weight) { // changed groups are handled here
+		else if(ndw->weight != odw->weight) { /* changed groups are handled here */
 			totchange += ndw->weight - odw->weight;
-			change_status[i] = 2; // was altered already
+			change_status[i] = 2; /* was altered already */
 			total_changed++;
 			if(ndw->weight == 0) {
 				new_weight_has_zero = TRUE;
@@ -1423,23 +1433,23 @@
 			else if(designatedw == -1){
 				designatedw = i;
 			}
-		} // unchanged, unlocked bone groups are handled here
+		} /* unchanged, unlocked bone groups are handled here */
 		else if (vgroup_validmap[i]){
 			totchange_allowed += ndw->weight;
 			total_valid++;
-			change_status[i] = 1; // can be altered while redistributing
+			change_status[i] = 1; /* can be altered while redistributing */
 		}
 	}
-	// if there was any change, redistribute it
+	/* if there was any change, redistribute it */
 	if(total_changed) {
-		// auto normalize will allow weights to temporarily go above 1 in redistribution
+		/* auto normalize will allow weights to temporarily go above 1 in redistribution */
 		if(vgroup_validmap && total_changed < 0 && total_valid) {
 			totchange_allowed = total_valid;
 		}
-		// there needs to be change allowed, or you should not bother
+		/* there needs to be change allowed, or you should not bother */
 		if(totchange_allowed) {
-			// the way you modify the unlocked+unchanged groups is different depending
-			// on whether or not you are painting the weight(s) up or down
+			/* the way you modify the unlocked+unchanged groups is different depending
+			 * on whether or not you are painting the weight(s) up or down */
 			if(totchange < 0) {
 				totchange_allowed = total_valid - totchange_allowed;
 			}

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list