[Bf-python] Scripts & Armatures

Gilbert, Joseph T. jgilbert at tigr.ORG
Wed Dec 14 16:48:36 CET 2005


setPose() was a bit of a hack but right now I don't have a replacement for you. :/ 
What this method does is pull the loc/rot/size from the bone and put it in an ipo curve in an Action. It's the only way to set animation frames right now. Because we had no way to get the animation working this method served us well.

The plan however, is to have a 'pose' module which you can use to manipulate the object-level transformation of each bone and from there - you can set the loc/rot/size into an Action. (like you do in the UI with posemode)
The pose code should allow you to manipulate bones with matrices, quat, etc.

The bone.quat stuff was exposed previously but was changed internally with the armature rewrite. Also this property was calculated after the screen updated which caused some weird bugs for people.

The way the editbones work is that you set the head,tail,roll and then parent them to set up the armature. 
Once the armature is setup and parented to an object, you will be able to get the Pose of the object and set the loc/rot/size in each bone in the pose, then send that to an ipo curve. 


-----Original Message-----
From: bf-python-bounces at projects.blender.org [mailto:bf-python-bounces at projects.blender.org] On Behalf Of PERIN Jean-Baptiste
Sent: Wednesday, December 14, 2005 8:40 AM
To: Blender Foundation Python list
Subject: Re: [Bf-python] Scripts & Armatures


--- Toni Alatalo <antont at kyperjokki.fi> a écrit :


> we talked about the Poses yesterday on irc with
> Joseph, and IIRC he is now 
> working on that part. after getting Armature and
> Bone in shape.

Great !!! I long to see the result.

> hopefully we'll get that Bone interface added soon.
> for what are you using it?

I'm updating the BVH2ARM.py script .. the one that
build an armature upon the heap of empty created by
bvh_import.py

By the past .. I used to build armature at rest Pose
by calling setHead() and setTail() functions .. and at
each frame of an animation I was using setQuat() and
setPose() to animate bones ..

According to new Armature API doc, Editbone.matrix is
not writable, and there no longer exist setQuat and
setPose functions ..

So I wonder how I'm going to update BVH2ARM script ..

> i'm currently working with action creation, where
> create ipo channels for the 
> bones.

Keep up the good work .. 
If you have exemple code that shows how it works ..
I'm higly interested in it ..

Keep me posted ..

Jean-Baptiste 


	

	
		
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com
_______________________________________________
Bf-python mailing list
Bf-python at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list