svn merge ^/trunk/blender -r42080:42095
[blender.git] / source / blender / editors / object / object_vgroup.c
index d00c4b7907f6f8504125e576fac600db6e03025a..b747d3bc9fc0c581c14005da20ca5e93bbdf0ba4 100644 (file)
@@ -141,6 +141,23 @@ void ED_vgroup_delete(Object *ob, bDeformGroup *defgroup)
                vgroup_delete_object_mode(ob, dg);
 }
 
+void ED_vgroup_clear(Object *ob)
+{
+       bDeformGroup *dg= (bDeformGroup *)ob->defbase.first;
+       int edit_mode= ED_vgroup_object_is_edit_mode(ob);
+
+       while (dg) {
+               bDeformGroup *next_dg= dg->next;
+
+               if(edit_mode)
+                       vgroup_delete_edit_mode(ob, dg);
+               else
+                       vgroup_delete_object_mode(ob, dg);
+
+               dg= next_dg;
+       }
+}
+
 int ED_vgroup_data_create(ID *id)
 {
        /* create deform verts */