Py BGE API
authorCampbell Barton <ideasman42@gmail.com>
Thu, 26 Feb 2009 09:04:06 +0000 (09:04 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 26 Feb 2009 09:04:06 +0000 (09:04 +0000)
Python dir(ob) for game types now includes attributes names,
* Use "__dict__" rather then "__methods__" attribute to be Python 3.0 compatible
* Added _getattr_dict() for getting the method and attribute names from a PyObject, rather then building it in the macro.
* Added place holder *::Attribute array, needed for the _getattr_up macro.

47 files changed:
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Expressions/Value.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_ANDController.cpp
source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_NANDController.cpp
source/gameengine/GameLogic/SCA_NORController.cpp
source/gameengine/GameLogic/SCA_ORController.cpp
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_XNORController.cpp
source/gameengine/GameLogic/SCA_XORController.cpp
source/gameengine/Ketsji/BL_Shader.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_CDActuator.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_NearSensor.cpp
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_ParentActuator.cpp
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_RadarSensor.cpp
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_SceneActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_StateActuator.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_VehicleWrapper.cpp
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VisibilityActuator.cpp

index 9acc6ad..90a939a 100644 (file)
@@ -232,7 +232,9 @@ PyMethodDef CListValue::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-
+PyAttributeDef CListValue::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* CListValue::_getattr(const char *attr) {
        _getattr_up(CValue);
index e04b42e..1bead0a 100644 (file)
@@ -707,5 +707,35 @@ PyObject *PyObjectPlus::Py_isA(PyObject *value)            // Python wrapper for isA
     Py_RETURN_FALSE;
 }
 
+/* Utility function called by the macro _getattr_up()
+ * for getting ob.__dict__() values from our PyObject
+ * this is used by python for doing dir() on an object, so its good
+ * if we return a list of attributes and methods.
+ * 
+ * Other then making dir() useful the value returned from __dict__() is not useful
+ * since every value is a Py_None
+ * */
+PyObject *_getattr_dict(PyObject *pydict, PyMethodDef *meth, PyAttributeDef *attrdef)
+{
+    if(pydict==NULL) { /* incase calling __dict__ on the parent of this object raised an error */
+       PyErr_Clear();
+       pydict = PyDict_New();
+    }
+       
+    if(meth) {
+               for (; meth->ml_name != NULL; meth++) {
+                       PyDict_SetItemString(pydict, meth->ml_name, Py_None);
+               }
+       }
+       
+    if(attrdef) {
+               for (; attrdef->m_name != NULL; attrdef++) {
+                       PyDict_SetItemString(pydict, attrdef->m_name, Py_None);
+               }
+       }
+
+       return pydict;
+}
+
 #endif //NO_EXP_PYTHON_EMBEDDING
 
index 37eae3a..1a5f50a 100644 (file)
@@ -89,35 +89,22 @@ static inline void Py_Fatal(const char *M) {
   virtual PyParentObject *GetParents(void) {return Parents;}
 
 
+
                                                                // This defines the _getattr_up macro
                                                                // which allows attribute and method calls
                                                                // to be properly passed up the hierarchy.
 #define _getattr_up(Parent) \
-  PyObject *rvalue = NULL; \
-  if (!strcmp(attr, "__methods__")) { \
-    PyObject *_attr_string = NULL; \
-    PyMethodDef *meth = Methods; \
-    rvalue = Parent::_getattr(attr); \
-    if (rvalue==NULL) { \
-       PyErr_Clear(); \
-       rvalue = PyList_New(0); \
-    } \
-    if (meth) { \
-      for (; meth->ml_name != NULL; meth++) { \
-        _attr_string = PyString_FromString(meth->ml_name); \
-               PyList_Append(rvalue, _attr_string); \
-               Py_DECREF(_attr_string); \
-         } \
+       PyObject *rvalue = Py_FindMethod(Methods, this, attr); \
+        \
+       if (rvalue == NULL) { \
+               PyErr_Clear(); \
+               rvalue = Parent::_getattr(attr); \
        } \
-  } else { \
-    rvalue = Py_FindMethod(Methods, this, attr); \
-    if (rvalue == NULL) { \
-      PyErr_Clear(); \
-      rvalue = Parent::_getattr(attr); \
-    } \
-  } \
-  return rvalue; \
-
+       if ((rvalue == NULL) && !strcmp(attr, "__dict__")) {\
+               PyErr_Clear(); \
+               rvalue = _getattr_dict(Parent::_getattr(attr), Methods, Attributes); \
+       } \
+       return rvalue; \
 
 /**
  * These macros are helpfull when embedding Python routines. The second
@@ -398,6 +385,8 @@ public:
        }
 };
 
+PyObject *_getattr_dict(PyObject *pydict, PyMethodDef *meth, PyAttributeDef *attrdef);
+
 #endif //  _adr_py_lib_h_
 
 #endif //NO_EXP_PYTHON_EMBEDDING
index 9b26cda..d29e396 100644 (file)
@@ -673,6 +673,10 @@ static PyMethodDef CValueMethods[] =
        { NULL,NULL}    // Sentinel
 };
 
+PyAttributeDef CValue::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 
 PyObject*      CValue::_getattr(const char *attr)
 {
index 6fcb1be..7bf051f 100644 (file)
@@ -113,6 +113,9 @@ PyMethodDef SCA_2DFilterActuator::Methods[] = {
     {NULL,NULL}
 };
 
+PyAttributeDef SCA_2DFilterActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* SCA_2DFilterActuator::_getattr(const char *attr) {
     _getattr_up(SCA_IActuator);
index 98a3c2e..b67ef7d 100644 (file)
@@ -137,6 +137,10 @@ PyMethodDef SCA_ANDController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_ANDController::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* SCA_ANDController::_getattr(const char *attr) {
        _getattr_up(SCA_IController);
 }
index 76aa328..154f0ad 100644 (file)
@@ -135,6 +135,10 @@ PyMethodDef SCA_AlwaysSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_AlwaysSensor::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* SCA_AlwaysSensor::_getattr(const char *attr) {
        _getattr_up(SCA_ISensor);
 }
index e5ca26e..d8f5f3e 100644 (file)
@@ -407,6 +407,9 @@ PyMethodDef SCA_IObject::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_IObject::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 
 PyObject* SCA_IObject::_getattr(const char *attr) {
index 0efa8da..18426d7 100644 (file)
@@ -137,6 +137,10 @@ PyMethodDef SCA_NANDController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_NANDController::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* SCA_NANDController::_getattr(const char *attr) {
        _getattr_up(SCA_IController);
 }
index fa24be9..1de6a64 100644 (file)
@@ -137,6 +137,10 @@ PyMethodDef SCA_NORController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_NORController::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* SCA_NORController::_getattr(const char *attr) {
        _getattr_up(SCA_IController);
 }
index 42a29e1..61fbc88 100644 (file)
@@ -129,6 +129,11 @@ PyMethodDef SCA_ORController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_ORController::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
+
 PyObject* SCA_ORController::_getattr(const char *attr) {
        _getattr_up(SCA_IController);
 }
index 92852ee..c75e36a 100644 (file)
@@ -264,6 +264,9 @@ PyMethodDef SCA_PythonController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_PythonController::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 bool SCA_PythonController::Compile()
 {
index b019aed..b2734dd 100644 (file)
@@ -141,6 +141,10 @@ PyMethodDef SCA_XNORController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_XNORController::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* SCA_XNORController::_getattr(const char *attr) {
        _getattr_up(SCA_IController);
 }
index 11ffa19..662ef52 100644 (file)
@@ -141,6 +141,10 @@ PyMethodDef SCA_XORController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_XORController::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* SCA_XORController::_getattr(const char *attr) {
        _getattr_up(SCA_IController);
 }
index e828120..60cb288 100644 (file)
@@ -767,6 +767,9 @@ PyMethodDef BL_Shader::Methods[] =
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef BL_Shader::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyTypeObject BL_Shader::Type = {
        PyObject_HEAD_INIT(&PyType_Type)
index 31f1d2d..4e5f27d 100644 (file)
@@ -143,6 +143,10 @@ PyMethodDef KX_NetworkMessageActuator::Methods[] = {
        {NULL,NULL} // Sentinel
 };
 
+PyAttributeDef KX_NetworkMessageActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_NetworkMessageActuator::_getattr(const char *attr) {
        _getattr_up(SCA_IActuator);
 }
index cb9956d..ac89d8b 100644 (file)
@@ -213,6 +213,10 @@ PyMethodDef KX_NetworkMessageSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_NetworkMessageSensor::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_NetworkMessageSensor::_getattr(const char *attr) {
        _getattr_up(SCA_ISensor); // implicit return!
 }
index 5fa1992..b9bd764 100644 (file)
@@ -748,6 +748,9 @@ PyMethodDef KX_BlenderMaterial::Methods[] =
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_BlenderMaterial::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyTypeObject KX_BlenderMaterial::Type = {
        PyObject_HEAD_INIT(&PyType_Type)
index 7d238e2..ef78839 100644 (file)
@@ -197,7 +197,9 @@ PyMethodDef KX_CDActuator::Methods[] = {
        {NULL,NULL,NULL,NULL} //Sentinel
 };
 
-
+PyAttributeDef KX_CDActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* KX_CDActuator::_getattr(const char *attr)
 {
index 99e2d3b..5caac2f 100644 (file)
@@ -483,6 +483,10 @@ PyMethodDef KX_Camera::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_Camera::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 char KX_Camera::doc[] = "Module KX_Camera\n\n"
 "Constants:\n"
 "\tINSIDE\n"
index 8a7ff41..fba9544 100644 (file)
@@ -612,6 +612,10 @@ PyMethodDef KX_ConstraintActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_ConstraintActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_ConstraintActuator::_getattr(const char *attr) {
        _getattr_up(SCA_IActuator);
 }
index 9ceb4a0..f014c18 100644 (file)
@@ -130,3 +130,7 @@ PyMethodDef KX_ConstraintWrapper::Methods[] = {
        {"getConstraintId",(PyCFunction) KX_ConstraintWrapper::sPyGetConstraintId, METH_VARARGS},
        {NULL,NULL} //Sentinel
 };
+
+PyAttributeDef KX_ConstraintWrapper::Attributes[] = {
+       { NULL }        //Sentinel
+};
index 3090c66..3c0695b 100644 (file)
@@ -246,6 +246,10 @@ PyMethodDef KX_GameActuator::Methods[] =
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_GameActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 /* getFile */
 const char KX_GameActuator::GetFile_doc[] = 
 "getFile()\n"
index 9c6bd2e..95df9d5 100644 (file)
@@ -1033,6 +1033,9 @@ PyMethodDef KX_GameObject::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_GameObject::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 
 /*
index ca84196..623a939 100644 (file)
@@ -457,6 +457,10 @@ PyMethodDef KX_IpoActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_IpoActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_IpoActuator::_getattr(const char *attr) {
        _getattr_up(SCA_IActuator);
 }
index 3670026..a2e93ec 100644 (file)
@@ -301,6 +301,10 @@ PyMethodDef KX_LightObject::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_LightObject::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 char KX_LightObject::doc[] = "Module KX_LightObject\n\n"
 "Constants:\n"
 "\tSPOT\n"
index 4b94990..a0c0a49 100644 (file)
@@ -86,6 +86,10 @@ KX_PYMETHODTABLE(KX_MeshProxy, reinstancePhysicsMesh),
   {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_MeshProxy::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 void KX_MeshProxy::SetMeshModified(bool v)
 {
        m_meshobj->SetMeshModified(v);
index afe4cd1..3840344 100644 (file)
@@ -332,6 +332,10 @@ PyMethodDef KX_MouseFocusSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_MouseFocusSensor::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_MouseFocusSensor::_getattr(const char *attr) {
        _getattr_up(SCA_MouseSensor);
 }
index d859f67..066387a 100644 (file)
@@ -318,6 +318,9 @@ PyMethodDef KX_NearSensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_NearSensor::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject*
 KX_NearSensor::_getattr(const char *attr)
index b647c72..0666261 100644 (file)
@@ -332,6 +332,10 @@ PyMethodDef KX_ObjectActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_ObjectActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_ObjectActuator::_getattr(const char *attr) {
        _getattr_up(SCA_IActuator);
 };
index 5a90818..84d7ccb 100644 (file)
@@ -172,6 +172,10 @@ PyMethodDef KX_ParentActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_ParentActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_ParentActuator::_getattr(const char *attr) {      
        
        if (!strcmp(attr, "object")) {
index ff962d5..b4bdd77 100644 (file)
@@ -77,6 +77,10 @@ PyMethodDef KX_PolyProxy::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_PolyProxy::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_PolyProxy::_getattr(const char *attr)
 {
        if (!strcmp(attr, "matname"))
index 52c5b01..bbaf697 100644 (file)
@@ -180,6 +180,9 @@ PyMethodDef KX_PolygonMaterial::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_PolygonMaterial::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyTypeObject KX_PolygonMaterial::Type = {
        PyObject_HEAD_INIT(&PyType_Type)
index 2ba1126..c347faa 100644 (file)
@@ -230,6 +230,10 @@ PyMethodDef KX_RadarSensor::Methods[] = {
        {NULL,NULL,NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_RadarSensor::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_RadarSensor::_getattr(const char *attr) {
        _getattr_up(KX_TouchSensor);
 }
index c7cb53f..ce12b98 100644 (file)
@@ -343,6 +343,10 @@ PyMethodDef KX_RaySensor::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_RaySensor::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 const char KX_RaySensor::GetHitObject_doc[] = 
 "getHitObject()\n"
 "\tReturns the name of the object that was hit by this ray.\n";
index 017ab5d..68b704f 100644 (file)
@@ -204,6 +204,9 @@ PyMethodDef KX_SCA_AddObjectActuator::Methods[] = {
   {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_SCA_AddObjectActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* KX_SCA_AddObjectActuator::_getattr(const char *attr)
 {
index 1aba05c..394bb66 100644 (file)
@@ -85,6 +85,9 @@ PyMethodDef KX_SCA_DynamicActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_SCA_DynamicActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 
 PyObject* KX_SCA_DynamicActuator::_getattr(const char *attr)
index 443921d..9268a1d 100644 (file)
@@ -127,6 +127,9 @@ PyMethodDef KX_SCA_EndObjectActuator::Methods[] = {
   {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_SCA_EndObjectActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* KX_SCA_EndObjectActuator::_getattr(const char *attr)
 {
index ccc3b8f..502990b 100644 (file)
@@ -89,7 +89,9 @@ PyMethodDef KX_SCA_ReplaceMeshActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
-
+PyAttributeDef KX_SCA_ReplaceMeshActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* KX_SCA_ReplaceMeshActuator::_getattr(const char *attr)
 {
index 5ae1abc..073cfc9 100644 (file)
@@ -1525,6 +1525,10 @@ PyMethodDef KX_Scene::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_Scene::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyTypeObject KX_Scene::Type = {
        PyObject_HEAD_INIT(&PyType_Type)
                0,
index 8e33177..1cad4e2 100644 (file)
@@ -268,7 +268,9 @@ PyMethodDef KX_SceneActuator::Methods[] =
        {NULL,NULL} //Sentinel
 };
 
-
+PyAttributeDef KX_SceneActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* KX_SceneActuator::_getattr(const char *attr)
 {
index 562c096..6de1d67 100644 (file)
@@ -285,7 +285,9 @@ PyMethodDef KX_SoundActuator::Methods[] = {
        {NULL,NULL,NULL,NULL} //Sentinel
 };
 
-
+PyAttributeDef KX_SoundActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 PyObject* KX_SoundActuator::_getattr(const char *attr)
 {
index cd5c5d2..0de4da7 100644 (file)
@@ -146,6 +146,10 @@ KX_StateActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_StateActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_StateActuator::_getattr(const char *attr)
 {
        _getattr_up(SCA_IActuator);
index 9d4fa14..8637bc9 100644 (file)
@@ -468,6 +468,9 @@ PyMethodDef KX_TrackToActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_TrackToActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 
 PyObject* KX_TrackToActuator::_getattr(const char *attr)
index 057e10f..8d5af1b 100644 (file)
@@ -382,3 +382,6 @@ PyMethodDef KX_VehicleWrapper::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_VehicleWrapper::Attributes[] = {
+       { NULL }        //Sentinel
+};
index 1c42776..da0e3db 100644 (file)
@@ -78,6 +78,10 @@ PyMethodDef KX_VertexProxy::Methods[] = {
   {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_VertexProxy::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject*
 KX_VertexProxy::_getattr(const char *attr)
 {
index ca89a63..0ec2800 100644 (file)
@@ -126,6 +126,10 @@ KX_VisibilityActuator::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_VisibilityActuator::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 PyObject* KX_VisibilityActuator::_getattr(const char *attr) 
 {
        _getattr_up(SCA_IActuator);