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-08-25 17:43:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-08-25 17:43:21 +0400
commit855974dad931bcba8a63260d1f642da49902d569 (patch)
tree09f71f7f16aee22229f41e91583a1535ce701b7a /source/gameengine/PyDoc
parent8aa6f672bab266986c7d775cfb01c48d834d3ad9 (diff)
patch from Mitchell Stokes adding dictionary like access to a scene. (like KX_GameObjects have)
val = scene["prop"] scene["prop"] = newval if "prop" in scene: ... val = scene.get("prop", fallback_val)
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r--source/gameengine/PyDoc/GameTypes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py
index c82623e6409..9c426aed8e0 100644
--- a/source/gameengine/PyDoc/GameTypes.py
+++ b/source/gameengine/PyDoc/GameTypes.py
@@ -3868,6 +3868,12 @@ class KX_Scene(PyObjectPlus):
@rtype: L{KX_GameObject}
"""
+
+ def get(key, default=None):
+ """
+ Return the value matching key, or the default value if its not found.
+ @return: The key value or a default.
+ """
class KX_SceneActuator(SCA_IActuator):
"""