diff options
author | Chris Want <cwant@ualberta.ca> | 2003-05-06 06:32:56 +0400 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2003-05-06 06:32:56 +0400 |
commit | a9193a88ca873dfa877135d789e664910e8d608f (patch) | |
tree | faaa88269f301db9ac88a163592a156d1899dacf /source/blender/src/editarmature.c | |
parent | 853d3c711a5f0a0c5d7cb035888090aefb0d2549 (diff) |
Autoskinning:
-- added Matt Ebb's menu suggestion
-- Maybe it so the 'empty'/'name' option is disabled for bones that
are of type 'Unskinnable'.
Diffstat (limited to 'source/blender/src/editarmature.c')
-rw-r--r-- | source/blender/src/editarmature.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index d062925861c..4249c89294f 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -2658,12 +2658,14 @@ int bone_looper(Object *ob, Bone *bone, void *data, int add_defgroup_unique_bone(Object *ob, Bone *bone, void *data) { /* This group creates a vertex group to ob that has the - * same name as bone. Is such a vertex group aleady exist - * the routine exits. + * same name as bone (provided the bone is skinnable). + * If such a vertex group aleady exist the routine exits. */ - if (!get_named_vertexgroup(ob,bone->name)) { - add_defgroup_name(ob, bone->name); - return 1; + if ( bone_skinnable(ob, bone, NULL) ) { + if (!get_named_vertexgroup(ob,bone->name)) { + add_defgroup_name(ob, bone->name); + return 1; + } } return 0; } @@ -2925,8 +2927,10 @@ void create_vgroups_from_armature(Object *ob, Object *par) /* Prompt the user on whether/how they want the vertex groups * added to the child mesh */ - mode= pupmenu("Vertex Groups from Bones? %t|No Thanks %x1|Empty %x2|" - "Closest Bone %x3"); + mode= pupmenu("Create Vertex Groups? %t|" + "Don't Create Groups %x1|" + "Name Groups %x2|" + "Create From Closest Bones %x3"); switch (mode){ case 2: /* Traverse the bone list, trying to create empty vertex |