[Bf-committers] New BGE Actions (Animation) Interface

Mitchell Stokes mogurijin at gmail.com
Sat Oct 2 05:24:51 CEST 2010


Hello,

Currently the only way to use actions in the BGE is via actuators (FCurve,
Shape Action and Action actuators). This leaves Python scripters with clunky
solutions to playback animations. To remedy this, the following proposal was
created:

http://wiki.blender.org/index.php/User:Moguri/BGE_Animation_Proposal

I began working away at this, and here is my first patch:
http://www.pasteall.org/15953/diff

Currently it only supports armature actions,  the following play types:
ACT_MODE_PLAY,
ACT_MODE_LOOP,
ACT_MODE_PING_PONG

and the following blend types:
ACT_BLEND_NONE,
ACT_BLEND_MIX

The max layers is set to 4, but this can be changed easily. I think shape
actions will be easy enough to add (it's deformer based like armatures), but
replacing object fcurves might be more tricky as the BGE has it's own IPO
system. I'll have to do more digging there.

Anyways, my point in sending this to the list is to get feedback from other
devs to see if this is heading in the right direction. Another thing is that
my main intent for this is better character animation control in the BGE, so
I'm not sure if I want to complete all parts of the proposal (eg, logic
bricks, all the blend modes, fcurve actuator replacement). I'm willing to
work on the getting armature actions working well and possibly shape
actions, but I'd also like to get those in trunk. Thoughts?

Thanks,
Mitchell Stokes (Moguri)


More information about the Bf-committers mailing list