Revision: 38313
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38313
Author:   jason_hays22
Date:     2011-07-11 17:27:37 +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-radish/source/blender/editors/sculpt_paint/paint_vertex.c

Modified: 
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c 
2011-07-11 17:23:57 UTC (rev 38312)
+++ branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c 
2011-07-11 17:27:37 UTC (rev 38313)
@@ -1320,7 +1320,7 @@
                        total_changed++;
                        if(ndw->weight == 0) {
                                new_weight_has_zero = TRUE;
-                       } else if(!designatedw){
+                       } else if(designatedw == -1){
                                designatedw = i;
                        }
                } // unchanged, unlocked bone groups are handled here
@@ -1361,7 +1361,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) {
                                        // this dw is special, it is used as a 
base to determine how to change the others
                                        ndw = defvert_find_index(ndv, 
designatedw);
                                        odw = defvert_find_index(odv, 
designatedw);
@@ -1378,7 +1378,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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to