From 4cd088b1059afa2e7b998c184b2c9deecd4be4a9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Apr 2009 20:58:09 +0000 Subject: 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. --- source/gameengine/Expressions/ListValue.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/gameengine/Expressions/ListValue.h') 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: -- cgit v1.2.3