Blender Git Loki

Git Commits -> Revision 6a270ec

Revision 6a270ec by Campbell Barton (master)
April 23, 2009, 00:32 (GMT)
BGE Python API

CListValue fixes
- Disable changing CValueLists that the BGE uses internally (scene.objects.append(1) would crash when drawing)
- val=clist+list would modify clist in place, now return a new value.
- clist.append([....]), was working like extend.
- clist.append(val) didnt work for most CValue types like KX_GameObjects.

Other changes
- "isValid" was always returning True.
- Set all errors for invalid proxy access to PyExc_SystemError (was using a mix of error types)
- Added PyObjectPlus::InvalidateProxy() to manually invalidate, though if python ever gains access again, it will make a new valid proxy. This is so removing an object from a scene can invalidate the object even if its stored elsewhere in a CValueList for eg.

Commit Details:

Full Hash: 6a270ecb9435fd695988de5c685c65cac5a43c79
SVN Revision: 19885
Parent Commit: d568794
Lines Changed: +146, -90

9 Modified Paths:

/source/gameengine/Expressions/ListValue.cpp (+86, -67) (Diff)
/source/gameengine/Expressions/PyObjectPlus.cpp (+21, -4) (Diff)
/source/gameengine/Expressions/PyObjectPlus.h (+2, -0) (Diff)
/source/gameengine/Expressions/Value.cpp (+19, -9) (Diff)
/source/gameengine/Expressions/Value.h (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+5, -5) (Diff)
/source/gameengine/Ketsji/KX_MeshProxy.cpp (+1, -1) (Diff)
/source/gameengine/Ketsji/KX_Scene.cpp (+9, -1) (Diff)
/source/gameengine/Ketsji/KX_SceneActuator.cpp (+2, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021