Revision: 51245
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51245
Author:   cyborgmuppet
Date:     2012-10-10 08:29:13 +0000 (Wed, 10 Oct 2012)
Log Message:
-----------
Changing clear weight code from "assigning 0" to "removing".
Its less efficient but better practice.
+ Some style clean. 

Modified Paths:
--------------
    trunk/blender/source/blender/editors/object/object_vgroup.c

Modified: trunk/blender/source/blender/editors/object/object_vgroup.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_vgroup.c 2012-10-10 
08:07:28 UTC (rev 51244)
+++ trunk/blender/source/blender/editors/object/object_vgroup.c 2012-10-10 
08:29:13 UTC (rev 51245)
@@ -507,14 +507,13 @@
 
        /* clear weights */
        if (replace_mode == WT_REPLACE_ALL_WEIGHTS) {
-               for(i = 0, dv_dst = dv_array_dst; i < me_dst->totvert; i++, 
dv_dst++) {
+               for (i = 0, dv_dst = dv_array_dst; i < me_dst->totvert; i++, 
dv_dst++) {
 
-                       if (*dv_dst == NULL) {
-                               continue;
-                       }
+                       if (*dv_dst == NULL) continue;
 
                        dw_dst = defvert_verify_index(*dv_dst, index_dst);
-                       if (dw_dst) (*dw_dst).weight = 0;
+                       /* remove vertex from group */
+                       if (dw_dst) defvert_remove_group(*dv_dst, dw_dst);
                }
        }
 
@@ -562,7 +561,7 @@
 
                                /* reset nearest */
                                nearest.dist = FLT_MAX;
-                               /* With current binary tree its marginally 
faster to start searching at the top, as opposed to previous search. */
+                               /* with current binary tree its marginally 
faster to start searching at the top, as opposed to previous search. */
                                nearest.index = -1;
 
                                /* transform into target space */
@@ -601,7 +600,7 @@
 
                                /* reset nearest */
                                nearest.dist = FLT_MAX;
-                               /* With current binary tree its marginally 
faster to start searching at the top, as opposed to previous search. */
+                               /* with current binary tree its marginally 
faster to start searching at the top, as opposed to previous search. */
                                nearest.index = -1;
 
                                /* transform into target space */

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

Reply via email to