diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-16 11:16:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-16 11:16:51 +0400 |
commit | 2ecbe1c81cec6f537aa10829e94fbc451f9bc823 (patch) | |
tree | feba81632819f672cc62b118b5f73e2e2193d2cf /source/gameengine/PyDoc | |
parent | 6efd2e643953b293aaf7ef0de50d08badd2f49a8 (diff) |
BGE Py API
* Removed modules Expression and CValue, neither were ever available.
* Added GameLogic.EvalExpression(exp) from the Expression module, evaluates an expression like the expression controller (not sure if this is really that useful since python is far more advanced).
* resetting the original blend file path didint work (own fault == -> =)
* Py3.x PyModule_Create didnt allow importing since it didn't add to sys.modules,
Looks like they want us to use init-tab array, but this doesn't suit us since
it needs to be setup before python is initialized.
* Documented GameLogic.globalDict
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r-- | source/gameengine/PyDoc/GameLogic.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py index 3ec30a63c58..46f00fa7ea6 100644 --- a/source/gameengine/PyDoc/GameLogic.py +++ b/source/gameengine/PyDoc/GameLogic.py @@ -271,7 +271,7 @@ Documentation for the GameLogic Module. @var KX_PARENT_REMOVE: @var KX_PARENT_SET: -@group Shader: MODELMATRIX*, MODELVIEWMATRIX*, VIEWMATRIX*, CAM_POS, CONSTANT_TIMER +@group Shader: MODELMATRIX*, MODELVIEWMATRIX*, VIEWMATRIX*, CAM_POS, CONSTANT_TIMER, SHD_TANGENT @var VIEWMATRIX: @var VIEWMATRIX_INVERSE: @var VIEWMATRIX_INVERSETRANSPOSE: @@ -285,8 +285,8 @@ Documentation for the GameLogic Module. @var MODELVIEWMATRIX_INVERSETRANSPOSE: @var MODELVIEWMATRIX_TRANSPOSE: @var CAM_POS: Current camera position -@var CONSTANT_TIMER: Current camera position -@var SHD_TANGENT: Current camera position +@var CONSTANT_TIMER: User a timer for the uniform value. +@var SHD_TANGENT: Not yet documented. @group Blender Material: BL_* @var BL_DST_ALPHA: @@ -302,6 +302,13 @@ Documentation for the GameLogic Module. @var BL_ZERO: @group Deprecated: addActiveActuator + +@var globalDict: A dictionary that is saved between loading blend files so you can use + it to store inventory and other variables you want to store between + scenes and blend files. It can also be written to a file and loaded + later on with the game load/save actuators. + note: only python built in types such as int/string/bool/float/tuples/lists + can be saved, GameObjects, Actuators etc will not work as expectred. """ import GameTypes @@ -441,6 +448,14 @@ def setPhysicsTicRate(ticrate): @type ticrate: float """ +def EvalExpression(text): + """ + Evaluate the string as an expression, similar to the expression controller logic brick. + @param text: The expression to evaluate. + @type text: string + @return: The result of the expression. The type depends on the expression. + """ + #{ Utility functions def getAverageFrameRate(): """ |