The new animation blending system is close to being finished now, so I can tell more about how it will work. We have added two new functions for the animation/blending.
Code:
bool setupModelAnimStage( uint node, uint stage, uint res, const char *mask );
bool setModelAnimParams( uint node, uint stage, float time, float weight );
You have an (virtually arbitrary) number of stages (= animation channels) for each model. With the first function you put an animation on a stage and define a mask. The mask determines which joints are influenced by the animation. The mask can contain several joints. For each joint in the mask, the influence state of all of its successors in the skeleton hierachy is always inverted. This makes the mask very powerful and gives you easily much control for animation mixing.
The second function sets the current animation time and the weight of the stage. With this function it is possible to fade or blend between animations. The last thing to know is that the animations in the lower stages get priority if the sum of the weights is more than one.
We still have to test the system in practice for our project but I think that it should work out quite nice.
Any comments are welcome!