diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-12 00:58:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-12 00:58:09 +0400 |
commit | 4cd088b1059afa2e7b998c184b2c9deecd4be4a9 (patch) | |
tree | 48483da057f8a56a99db81e3dfbf5f1086d46374 /source/gameengine/Expressions/ListValue.h | |
parent | 37e53b2e1f8107cb8ddbee2d67bf984a70a71276 (diff) |
BGE Py API
- setting the scene attributes would always add to the scenes custom dictionary.
- new CListValue method from_id(id)
so you can store a Game Objects id and use it to get the game object back.
ob_id = id(gameOb)
...
gameOb = scene.objects.from_id(ob_id)
This is useful because names are not always unique.
Diffstat (limited to 'source/gameengine/Expressions/ListValue.h')
-rw-r--r-- | source/gameengine/Expressions/ListValue.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/ListValue.h b/source/gameengine/Expressions/ListValue.h index 1c01c2d221d..6f70acb9367 100644 --- a/source/gameengine/Expressions/ListValue.h +++ b/source/gameengine/Expressions/ListValue.h @@ -71,6 +71,7 @@ public: KX_PYMETHOD_NOARGS(CListValue,reverse); KX_PYMETHOD_O(CListValue,index); KX_PYMETHOD_O(CListValue,count); + KX_PYMETHOD_O(CListValue,from_id); private: |