Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-02-24 08:50:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-02-24 08:50:45 +0300
commit6c7c38a4e4892677f8e7db2b41115209901a2d35 (patch)
tree837963b7e941b66655903cc65edd05588497b19e /source/gameengine/PyDoc
parent394d893e13257cb0fc5bec815e2111c12d5ed4ec (diff)
BGE Py API
* Made GameLogic.addActiveActuator(actu, bool) to raise an error if the actuator is not in the list. Before it would allow any value as the actuator and fail silently (makes debugging scripts more difficult). * Allow the actuator to be a string which is convenient if you dont want to change the settings of the actuator. * Added activate/deactivate functions to the controller, this is more logical since the GameLogic.addActiveActuator() function is running through the controller anyway. GameLogic.addActiveActuator(controller.getActuator("SomeAct"), True) ...can be replaced with... controller.activate("SomeAct")
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r--source/gameengine/PyDoc/GameLogic.py2
-rw-r--r--source/gameengine/PyDoc/KX_Scene.py2
-rw-r--r--source/gameengine/PyDoc/SCA_PythonController.py12
3 files changed, 14 insertions, 2 deletions
diff --git a/source/gameengine/PyDoc/GameLogic.py b/source/gameengine/PyDoc/GameLogic.py
index 9dab7db6081..f743acf06fe 100644
--- a/source/gameengine/PyDoc/GameLogic.py
+++ b/source/gameengine/PyDoc/GameLogic.py
@@ -159,7 +159,7 @@ def addActiveActuator(actuator, activate):
"""
Activates the given actuator.
- @type actuator: L{SCA_IActuator}
+ @type actuator: L{SCA_IActuator} or the actuator name as a string.
@type activate: boolean
@param activate: whether to activate or deactivate the given actuator.
"""
diff --git a/source/gameengine/PyDoc/KX_Scene.py b/source/gameengine/PyDoc/KX_Scene.py
index 4a0a7a9556d..24b81bbf55e 100644
--- a/source/gameengine/PyDoc/KX_Scene.py
+++ b/source/gameengine/PyDoc/KX_Scene.py
@@ -39,6 +39,8 @@ class KX_Scene:
@ivar name: The scene's name
@type name: string
+ @type objects: A list of objects in the scene.
+ @type objects: list [L{KX_GameObject}]
@ivar active_camera: The current active camera
@type active_camera: L{KX_Camera}
@ivar suspended: True if the scene is suspended.
diff --git a/source/gameengine/PyDoc/SCA_PythonController.py b/source/gameengine/PyDoc/SCA_PythonController.py
index 06f2b7e9d1d..9684b41d481 100644
--- a/source/gameengine/PyDoc/SCA_PythonController.py
+++ b/source/gameengine/PyDoc/SCA_PythonController.py
@@ -15,7 +15,17 @@ class SCA_PythonController(SCA_IController):
This can be used with the GameObject's state to test if the controller is active.
@type state: integer
"""
-
+ def activate(actuator):
+ """
+ Activates an actuator attached to this controller.
+ @type actuator: actuator or the actuator name as a string
+ """
+ def deactivate(actuator):
+ """
+ Deactivates an actuator attached to this controller.
+ @type actuator: actuator or the actuator name as a string
+ """
+
def getSensors():
"""
Gets a list of all sensors attached to this controller.