Commit Graph

21 Commits

Author SHA1 Message Date
Mitchell Stokes
ee5284faf6 BGE: Dynamically-allocated action layers
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
2014-05-07 20:32:50 -07:00
Mitchell Stokes
362b25b382 Fix T39928: Blender crash/freeze when game engine is started with animation played directly on camera object with parents.
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.
2014-05-04 15:39:15 -07:00
Mitchell Stokes
9afae77fed BGE: Finally adding support for additive layer blending.
Currently this is only for the Python API. The logic brick will be updated in a future commit.
2013-08-14 23:31:49 +00:00
Mitchell Stokes
5a042eb734 BGE: Removing some unreachable and unused code in BL_ActionManager.cpp. 2013-08-03 05:01:23 +00:00
Campbell Barton
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Mitchell Stokes
296cc41b03 BGE Animations: Various changes to make code reviewers happy:
* Naming/style changes
  * Taking advantage of switch statements
  * Removing unneeded NULL checks
  * etc
2011-08-29 06:19:55 +00:00
Mitchell Stokes
8883702f8a BGE Animations: Various compatibility fixes:
* 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.
2011-08-08 04:28:30 +00:00
Mitchell Stokes
d3edf274b0 BGE Animations: This should solve the issue with NULL not being defined in BL_ActionManager.cpp 2011-07-30 17:27:54 +00:00
Mitchell Stokes
387439390d BGE Animations: Fixing some warnings from GCC about initialization order. 2011-07-29 21:58:31 +00:00
Mitchell Stokes
0eacdc94ba BGE Animations: Removing unused code and adding some more comments. 2011-07-07 03:53:24 +00:00
Mitchell Stokes
ceabc6d119 BGE Animations: Various fixes and bits of cleanup to get the action actuator to behave more like it did in trunk. The Pepper version is still more sensitive to pulses than the trunk version, but this is more accurate. I might try to address this, but I'm not sure. 2011-07-05 05:22:02 +00:00
Mitchell Stokes
5f4f75c51a BGE Animations: Adding in layer weights to allow for layer blending. 2011-07-03 01:59:17 +00:00
Mitchell Stokes
3afe0e9c88 BGE Animations: Beginning work on layer blending. Blending armature actions works, but needs more testing. Also, currently the mode is forced to ADD and the weight to 1. 2011-06-29 02:42:46 +00:00
Mitchell Stokes
d122f24c1a BGE Animations: Fixing a bug with priority and non continuous animations. 2011-06-29 01:53:17 +00:00
Mitchell Stokes
f1a2d46aa0 BGE Animations: Adding the concept of priority back. Priority is handled on a per layer basis. 2011-06-23 22:12:49 +00:00
Mitchell Stokes
c02006bc2b BGE Animations: Adding the ipo flag options to the action actuator. This still needs more testing. 2011-06-16 01:18:52 +00:00
Mitchell Stokes
c431863312 BGE Animations:
* 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.
2011-06-11 00:14:47 +00:00
Mitchell Stokes
39bbf3854a BGE Animations: Reimplemented the continuous function of the action actuator.
* To do this, I've added Get/SetFrame() functions.
  * I've also cleaned up a little bit of the wrap around logic in BL_Action.cpp.
2011-06-01 07:42:40 +00:00
Mitchell Stokes
54a37ba855 BGE Animations: Adding more functions to BL_ActionManager and KX_GameObject:
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
2011-06-01 05:46:19 +00:00
Mitchell Stokes
07dca94476 BGE Animation:
* Adding IPOs to BL_Action
  * Adding a "speed" option to adjust the playback speed by some factor
2011-05-28 07:15:27 +00:00
Mitchell Stokes
bd5f78d1a0 Moving BL_Action and BL_ActionManager to Ketsji to avoid linking issues with gcc 2011-05-27 08:45:48 +00:00