[Bf-committers] patch: armature as parent
Jiri Hnidek
bf-committers@blender.org
Wed, 07 Apr 2004 23:14:01 +0200
This is a multi-part message in MIME format.
--------------080503070309000001090906
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi all,
adding Armature as parent for curve/surface (using Bone or Armature)
crashes blender. I know, that it is not possible to have armature anim
for curves or somethnig else then mesh, but it is stupid to have
crashing blender (very old bug)
Jiri Hnidek
--------------080503070309000001090906
Content-Type: text/plain;
name="patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch.txt"
cvs -z3 diff "editobject.c"
Index: editobject.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/editobject.c,v
retrieving revision 1.79
diff -u -p -r1.79 editobject.c
--- editobject.c 28 Mar 2004 08:46:35 -0000 1.79
+++ editobject.c 7 Apr 2004 21:03:41 -0000
@@ -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("OK? %t|Make Parent %x3");
+ break;
+ }
+ if(base->object->type==OB_MESH) {
+ mode= pupmenu("Make Parent %t|Use Bone %x1|Use Armature %x2|Use Object %x3");
+ break;
+ }
+ }
+ }
+ base= base->next;
+ }
+
switch (mode){
case 1:
mode=PARBONE;
--------------080503070309000001090906--