diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-28 15:22:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-28 15:22:26 +0400 |
commit | 6b9f3b5f5c8d918585e01461a6202ae3df2df621 (patch) | |
tree | 655463247dee5167a8b7063bc6705eac84701bed /source/gameengine/Ketsji/KX_ConstraintActuator.h | |
parent | 6998a0f47b673591f8561cda35d50e93979de32c (diff) |
BGE Python API
Remove the last of the odd C++/python wrapper code from http://www.python.org/doc/PyCPP.html (~1998)
* Use python subclasses rather then having fake subclassing through get/set attributes calling parent types.
* PyObject getset arrays are created while initializing the types, converted from our own attribute arrays. This way python deals with subclasses and we dont have to define getattro or setattro functions for each type.
* GameObjects and Scenes no longer have attribute access to properties. only dictionary style access - ob['prop']
* remove each class's get/set/dir functions.
* remove isA() methods, can use PyObject_TypeCheck() in C and issubclass() in python.
* remove Parents[] array for each C++ class, was only used for isA() and wasnt correct in quite a few cases.
* remove PyTypeObject that was being passed as the last argument to each class (the parent classes too).
TODO -
* Light and VertexProxy need to be converted to using attributes.
* memory for getset arrays is never freed, not that bad since its will only allocates once.
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConstraintActuator.h')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintActuator.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index 40607b44947..677904aedc9 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -126,8 +126,7 @@ protected: int locrot, int time, int option, - char *property, - PyTypeObject* T=&Type); + char *property); virtual ~KX_ConstraintActuator(); virtual CValue* GetReplica() { KX_ConstraintActuator* replica = new KX_ConstraintActuator(*this); @@ -141,10 +140,6 @@ protected: /* Python interface ---------------------------------------------------- */ /* --------------------------------------------------------------------- */ - virtual PyObject* py_getattro(PyObject *attr); - virtual PyObject* py_getattro_dict(); - virtual int py_setattro(PyObject *attr, PyObject* value); - static int pyattr_check_direction(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_check_min(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); |