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 9acc6ad2cde8fafd972b6fa27e11081461c0b5f2..90a939af23611ac3447d0b98f188c1f036242eeb 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 e04b42ee9ccf5b507deb6ac49e87e01665ecfbd8..1bead0a7664e6e629a4cb12a7879d6bcfd9e2a07 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 37eae3a8c6184f68dc974c49f789da4313640d76..1a5f50a3d23a2d195d6c8df477ef28b02c43f2ea 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 9b26cda01b3e619f9d428e90b54ef90dbf9cd6df..d29e3961c6503d4f167a859a4f853dfe4b43c64c 100644 (file)
@@ -673,6 +673,10 @@ static PyMethodDef CValueMethods[] =
        { NULL,NULL}    // Sentinel
 };
 
+PyAttributeDef CValue::Attributes[] = {
+       { NULL }        //Sentinel
+};
+
 
 PyObject*      CValue::_getattr(const char *attr)
 {
index 6fcb1be654cf19d9a24a45760062d1c82c331ec5..7bf051f2b5cb559a396a05471bbf2da02f4baa02 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 98a3c2e96cdad76e66a8e46b339c3695d22fbb74..b67ef7dabaf19cd7ff7835c738a002a9c0f398ea 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 76aa328aa484fc6820d6e788d953e5292d84f449..154f0ad8cef7a6583a07640bd230f9014b74bdbc 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 e5ca26eac856861a40abd4fbbebceb28b942566d..d8f5f3eede57b8565bdc1d0ca121850f70b0e075 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 0efa8da153ab0b5254bc82237e188800a7305153..18426d755823fb1989089dbb56ca6bb537fad05f 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 fa24be9ebce240b913019cd871f1394c7c99dd3f..1de6a641c3d85d889a28d045d81f57076a340b8d 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 42a29e1959b9f04a76ed57ea72e0a8bac3b99de5..61fbc889d901d80d2ef34ad57b631594eda71a01 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 92852ee03cb3a6e11dd6ba85d792d13f4a5601b0..c75e36acab298b29919c601facfabceed9033d54 100644 (file)
@@ -264,6 +264,9 @@ PyMethodDef SCA_PythonController::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef SCA_PythonController::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 bool SCA_PythonController::Compile()
 {
index b019aedc93d7824335fae359cbfdd777ad059b0e..b2734dd1b330e518907d9638d6b7123f4ce17383 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 11ffa19b8f10ec4f44f467b7aa0d8da4f5867c7f..662ef523d5621d19f51873e2603ff8b6bbc13638 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 e8281201d2482fe1dc17113894c4ddc0d480131e..60cb288436ab137b18fd5fbdb5b5a7695c1919b0 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 31f1d2dd3ee71c2cec62fe61c50fe36b6cd1a8ce..4e5f27df2daac94ac69ca5bccc73a8e2221723d0 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 cb9956d46164a55da29031606baf26dde355c9d2..ac89d8b0716901d1e7002fcaa62270e97f21b5fb 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 5fa19924267e01b98f3db8b9a73a499ec7123e19..b9bd7647f89338d7df7701368069c7888b174ca2 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 7d238e28add98e153d19b39f301239f8b2433809..ef7883910fdd47431dfb8a318cc6cb16d9f8fab5 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 99e2d3b7c0643a12b8936cdec6cfe7e434a93be5..5caac2fc67037d653b4f634424f175e48e9d7548 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 8a7ff41dfa6c68ee49a57e53ca6b4577ae4cffec..fba9544d7027864cbadc043b53c395e5a1713299 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 9ceb4a05b067e7a9b4b8a2b503d99fef6c776b56..f014c1896fe47205d95995f9db30af9aa23c000d 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 3090c668f03e4f6f059160dac5b3bc11f467aed6..3c0695b59528d9a1ba8c03794ff2e8a199d72d48 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 9c6bd2edf0e9c225b34e190554cb19479894aed0..95df9d51a269e7ecf562df01f03803826dae2d28 100644 (file)
@@ -1033,6 +1033,9 @@ PyMethodDef KX_GameObject::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_GameObject::Attributes[] = {
+       { NULL }        //Sentinel
+};
 
 
 /*
index ca8419666b5e89e7e31dfcc21901009c87d212c5..623a939bf6275b3f589751a88d587058f70c6eac 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 3670026526099eda10c3283da2ab6b7269735fde..a2e93ecdd363a91dcd5975efa31d2dc1bbef522d 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 4b949903c88105b502bc6567247e1c138d905e5c..a0c0a496c064bf1b5484da6a20db4f53e9ae805b 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 afe4cd1e2a48b052ef173e15d64a5b8e3e58d52f..384034485e7f3cb4de0e230ce66efbd5092eb041 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 d859f670b07122cf86bbe5cea3f66047b7e38f22..066387abb93e601ca16280d5fa9c2f98c9a0633e 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 b647c72fc10707f1e1da4ce4b9b371685928465c..0666261b4705e75987e5c8ad111e9ff31a3b2a59 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 5a908186235c79981ab8d03f989a074c03ab6864..84d7ccb9c056c90f3bf415147f1e81a83ab39f9c 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 ff962d57c9d9c2680702b09407b5d367e4a9d2bd..b4bdd77fb6677e8afbf6d19b45075c35fb4feece 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 52c5b013e657a5b16b6cd3cdf6379354f6a5fe02..bbaf697b1684cf48b1263e95186304de702a353d 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 2ba1126a633d6b197df6bb6b03220985d473b43e..c347faaee1af46971a313a491966907f66a34553 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 c7cb53f64ed679ff0067ab25c76fd276d3d0d00c..ce12b98314700d21cd2d05593779e50feb33d68f 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 017ab5d6c9748a5a589f81f0b54a494ff2d3c922..68b704f4889b03993c411625042d7c1f7c496bce 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 1aba05c1d831f1756d6a1f45f707a4f62a84360b..394bb667728ed6feb808f9f2c32e94895c803a4d 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 443921d22b07ffd6d34c7a834f5f5d4d0c9422cd..9268a1df5f035b19f35da7bcfb6c6a402873238e 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 ccc3b8fdb180c5708e18615177f28a3c6444c82c..502990b2b27aa01df9d2996dee8b029681e2c7c3 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 5ae1abc6a89ecafc78e9e815f7b875ce8c2ecee5..073cfc98bf1b191e434534016518f877ed768f0a 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 8e33177cf3a83ce6df152ae5a17eabf46970befa..1cad4e2135270406977fc3d7eae7e2522c10a206 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 562c096d440b3b5a5a45f45252a5291ba8580b1c..6de1d67bfdb2cd1c5a25564dcb7280def91332ff 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 cd5c5d29ab14956bca7cd84d41b0fb352660d123..0de4da79bd8aa1eafb3e3e77e0581b1a288dc5d7 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 9d4fa14ad8ebb679879343a52114facab174023f..8637bc92d3953459cf5a6510d11d701a46bdb6cd 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 057e10f195a444bd9df6c1c77869b5248c1c99d3..8d5af1b92164420787c109ef8e9ad8bb6f71b055 100644 (file)
@@ -382,3 +382,6 @@ PyMethodDef KX_VehicleWrapper::Methods[] = {
        {NULL,NULL} //Sentinel
 };
 
+PyAttributeDef KX_VehicleWrapper::Attributes[] = {
+       { NULL }        //Sentinel
+};
index 1c427768b66aa7ff40320b925cc8e33e65e55f02..da0e3dbdd8d007506276049b536280c34504f535 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 ca89a63de62060a99fca4dc87f893979fc6061af..0ec280080bd582546e684f6fa565cda14719dde5 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);