[Bf-python] RE: action / NLA api
Roland Hess
rolandh at reed-witting.com
Fri Nov 11 13:26:52 CET 2005
Hi folks. The implementation I'm on working is this:
In the n-key panel and regular buttons panel for an action strip ,
the user can select a Bone from a drop-down menu of all bones in the
armature that the currently selected action strip is attached to.
That's all the user interaction.
Every time there's an edit to the NLA, the code follows the NLA chain
and calculates and caches a cumulative transform matrix for each
action strip, building on the previous, so that when NLA is solved
for display, it can quickly apply a single transform to the result,
based on the top-most action strip at the active frame.
The API for something like this could be as simple as:
strip.matchbone.set("foot.b.left")
strip.matchbone.get()
strip.matchbone.clear()
The match bone is a property of the Action Strip. It uses the already
existing blendin/blendout values for smoothness. The one thing you'd
want to determine would be whether or not the .set("foo") would take
a string, like I've shown here, or would take a Bone object as it's
argument. The actual code (right now) stores a pointer to a bone, so
if you wanted to accept a string, you'd have to do an object lookup
based on the name.
That's all!
--
Roland Hess - harkyman
More information about the Bf-python
mailing list