[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38314] branches/soc-2011-salad/source/ blender/editors/sculpt_paint/paint_vertex.c: Found and fixed a problem with locking ( noticed it when it was being used with multi-paint):
Jason Hays
jason_hays22 at mymail.eku.edu
Mon Jul 11 19:56:24 CEST 2011
Revision: 38314
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38314
Author: jason_hays22
Date: 2011-07-11 17:56:24 +0000 (Mon, 11 Jul 2011)
Log Message:
-----------
Found and fixed a problem with locking (noticed it when it was being used with multi-paint):
it did not have a proper condition to set designatedw
Modified Paths:
--------------
branches/soc-2011-salad/source/blender/editors/sculpt_paint/paint_vertex.c
Modified: branches/soc-2011-salad/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/sculpt_paint/paint_vertex.c 2011-07-11 17:27:37 UTC (rev 38313)
+++ branches/soc-2011-salad/source/blender/editors/sculpt_paint/paint_vertex.c 2011-07-11 17:56:24 UTC (rev 38314)
@@ -1151,7 +1151,7 @@
total_changed++;
if(ndw->weight == 0) {
new_weight_has_zero = TRUE;
- } else if(!designatedw){
+ } else if(designatedw == -1){
designatedw = i;
}
} else if (bone_groups[i]){
@@ -1185,7 +1185,7 @@
left_over += totchange_allowed;
if(left_over) {
// more than one nonzero weights were changed with the same ratio, so keep them changed that way!
- if(total_changed > 1 && !new_weight_has_zero) {
+ if(total_changed > 1 && !new_weight_has_zero && designatedw >= 0) {
ndw = defvert_find_index(ndv, designatedw);
odw = defvert_find_index(odv, designatedw);
storedw = ndw->weight;
@@ -1201,7 +1201,7 @@
}
}
}
- // a weight was changed to zero, or only one weight was changed
+ // a weight was changed to zero, only one weight was changed, or designatedw is still -1
// put weight back as evenly as possible
else {
redistribute_change(ndv, change_status, 2, -2, validmap, left_over, total_changed);
More information about the Bf-blender-cvs
mailing list