fix for vertex group copy to selected

- was using un-initialized stack memory if the source / target object had no vertex group.
- if the target object had no vertex groups it would fails silently (not a bug but not very good functionality)
- added an error message if any copying fails.
This commit is contained in:
2011-06-07 18:04:03 +00:00
parent d16c1f3665
commit 299602b360
3 changed files with 35 additions and 11 deletions

View File

@@ -206,7 +206,7 @@ struct bDeformGroup *ED_vgroup_add(struct Object *ob);
struct bDeformGroup *ED_vgroup_add_name(struct Object *ob, const char *name);
void ED_vgroup_delete(struct Object *ob, struct bDeformGroup *defgroup);
void ED_vgroup_select_by_name(struct Object *ob, const char *name);
void ED_vgroup_data_create(struct ID *id);
int ED_vgroup_data_create(struct ID *id);
int ED_vgroup_give_array(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
int ED_vgroup_copy_array(struct Object *ob, struct Object *ob_from);
void ED_vgroup_mirror(struct Object *ob, const short mirror_weights, const short flip_vgroups);