This patch removes the limitations on the number of action layers in the BGE.
BL_ActionManager currently uses a fixed array to keep track of the action layers. This patch replaces the fixed array with a map which allows for dynamic allocation of action layers. Layers (map items) are automatically removed on BL_ActionManager's update function. The maximum number of layers is roughly the value of a short. Backwards functionality is maintained and there are no changes to the Python API.
Task Discussion:
https://developer.blender.org/T39572
Author: Kevin Ednalino
Reviewers: moguri
Differential Revision: https://developer.blender.org/D491
Updating object IPOs is not currently thread-safe since it also updates
children. This leads to problems when parents and children are both
animated. For now, updating object IPOs is done in its own loop to avoid
threading issues.
* Blendin for Loop End works even after a negative pulse. Flipper could still use some work in this area.
* Continuous works a lot better.
* BL_Action::SetFrame() should work a little smoother.
* Adding BL_Action::Play() and BL_Action::Stop()
* Making BL_ActonManger reuse BL_Actions instead of recreating them all the time
* Making the Property play type work for the Action actuator.
BL_ActionManager:
* IsActionDone(short layer) - Checks to see if the animation on the given layer has finished.
KX_GameObject:
* PlayAction(...) - Adds an action to the object's action manager
* StopAction(short layer) - Remove an action from the object's action manager
* IsActionDone(short layer) - Check if an action has finished playing