From a9193a88ca873dfa877135d789e664910e8d608f Mon Sep 17 00:00:00 2001 From: Chris Want Date: Tue, 6 May 2003 02:32:56 +0000 Subject: [PATCH] Autoskinning: -- added Matt Ebb's menu suggestion -- Maybe it so the 'empty'/'name' option is disabled for bones that are of type 'Unskinnable'. --- source/blender/src/editarmature.c | 18 +++++++++++------- 1 file 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