Blender Git Commit Log

Git Commits -> Revision 332032f

Revision 332032f by Campbell Barton (master)
April 12, 2009, 14:22 (GMT)
BGE Python API

Support for assigning any Type to a KX_GameObject

so you can do...
gameOb.follow = otherGameOb
gameOb[otherGameOb] = distanceTo
gameOb["path"] = [(x,y,x), (x,y,x)]
del gameOb[mesh]


* types that cannot be converted into CValue types are written into the KX_GameObject dict
* the KX_GameObject dict is only initialized when needed
* Python properties in this dict cannot be accessed by logic bricks
* dir(ob) and ob.getPropertyNames() return items from both CValue and Py dictionary properties.

Also found that CType was converting python lists to CType Lists but very buggy, would crash after printing the list most times.
Use python lists instead since logic bricks dont deal with lists.


Commit Details:

Full Hash: 332032fb9925091da49efa2e9c3653bdb3e68cba
SVN Revision: 19680
Parent Commit: ee24c82
Lines Changed: +262, -49

5 Modified Paths:

/source/gameengine/Expressions/PyObjectPlus.h (+3, -2) (Diff)
/source/gameengine/Expressions/Value.cpp (+22, -7) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+118, -39) (Diff)
/source/gameengine/Ketsji/KX_GameObject.h (+118, -1) (Diff)
/source/gameengine/Ketsji/KX_Scene.h (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021