BGE Py API
authorCampbell Barton <ideasman42@gmail.com>
Sat, 11 Apr 2009 20:58:09 +0000 (20:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 11 Apr 2009 20:58:09 +0000 (20:58 +0000)
commit4cd088b1059afa2e7b998c184b2c9deecd4be4a9
tree48483da057f8a56a99db81e3dfbf5f1086d46374
parent37e53b2e1f8107cb8ddbee2d67bf984a70a71276
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.cpp
source/gameengine/Expressions/ListValue.h
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/PyDoc/CListValue.py