[Bf-committers] patch: armature as parent

Jiri­ Hnidek bf-committers@blender.org
Thu, 08 Apr 2004 18:55:40 +0200


This is a multi-part message in MIME format.
--------------060302090800050007010302
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi
sure, I forgot on this. Here is new version. I hope,
that it is without any bugs.

Jiri Hnidek

> Actually, you should still be able to parent them to
> the bones, as this requires no deformation of the
> object, it should be quite possible with the current
> system.
> 
> Martin
> 
> --- Jiri­_Hnidek <jiri.hnidek@vslib.cz> wrote:
> 
>>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

--------------060302090800050007010302
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	8 Apr 2004 16:47:38 -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("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;

--------------060302090800050007010302--