Fix bug: adding Armature as parent for object, which is not Mesh, crashes blender. Menu item "Use Armature" is present only for Mesh object.

This commit is contained in:
Jiri Hnidek 2004-04-11 10:32:14 +00:00
parent 149fad4be6
commit c9a7e7e392

@ -775,7 +775,24 @@ void make_parent(void)
}
}
else if(par->type == OB_ARMATURE){
mode= pupmenu("Make Parent %t|Use Bone %x1|Use Armature %x2|Use Object %x3");
base= FIRSTBASE;
while(base) {
if TESTBASELIB(base) {
if(base!=BASACT) {
if(base->object->type==OB_MESH) {
mode= pupmenu("Make Parent %t|Use Bone %x1|Use Armature %x2|Use Object %x3");
break;
}
else {
mode= pupmenu("Make Parent %t|Use Bone %x1|Use Object %x3");
break;
}
}
}
base= base->next;
}
switch (mode){
case 1:
mode=PARBONE;