diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-23 04:32:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-23 04:32:33 +0400 |
commit | 6a270ecb9435fd695988de5c685c65cac5a43c79 (patch) | |
tree | 6bc0b992e1a1ee44b739be6e76b860ae6c0c8aba /source/gameengine/Expressions/PyObjectPlus.h | |
parent | d568794a9873eed10a9d240c1e1a1ba52aba929c (diff) |
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.
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.h')
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 52e59f7730c..257851ef4b3 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -451,6 +451,8 @@ public: static PyObject *GetProxy_Ext(PyObjectPlus *self, PyTypeObject *tp); static PyObject *NewProxy_Ext(PyObjectPlus *self, PyTypeObject *tp, bool py_owns); + void InvalidateProxy(); + /** * Makes sure any internal data owned by this class is deep copied. */ |