diff options
Diffstat (limited to 'source/gameengine')
47 files changed, 206 insertions, 29 deletions
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp index 9acc6ad2cde..90a939af236 100644 --- a/source/gameengine/Expressions/ListValue.cpp +++ b/source/gameengine/Expressions/ListValue.cpp @@ -232,7 +232,9 @@ PyMethodDef CListValue::Methods[] = { {NULL,NULL} //Sentinel }; - +PyAttributeDef CListValue::Attributes[] = { + { NULL } //Sentinel +}; PyObject* CListValue::_getattr(const char *attr) { _getattr_up(CValue); diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index e04b42ee9cc..1bead0a7664 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -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 diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 37eae3a8c61..1a5f50a3d23 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -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 diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index 9b26cda01b3..d29e3961c65 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -673,6 +673,10 @@ static PyMethodDef CValueMethods[] = { NULL,NULL} // Sentinel }; +PyAttributeDef CValue::Attributes[] = { + { NULL } //Sentinel +}; + PyObject* CValue::_getattr(const char *attr) { diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp index 6fcb1be654c..7bf051f2b5c 100644 --- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp +++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp @@ -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); diff --git a/source/gameengine/GameLogic/SCA_ANDController.cpp b/source/gameengine/GameLogic/SCA_ANDController.cpp index 98a3c2e96cd..b67ef7dabaf 100644 --- a/source/gameengine/GameLogic/SCA_ANDController.cpp +++ b/source/gameengine/GameLogic/SCA_ANDController.cpp @@ -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); } diff --git a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp index 76aa328aa48..154f0ad8cef 100644 --- a/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp +++ b/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp @@ -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); } diff --git a/source/gameengine/GameLogic/SCA_IObject.cpp b/source/gameengine/GameLogic/SCA_IObject.cpp index e5ca26eac85..d8f5f3eede5 100644 --- a/source/gameengine/GameLogic/SCA_IObject.cpp +++ b/source/gameengine/GameLogic/SCA_IObject.cpp @@ -407,6 +407,9 @@ PyMethodDef SCA_IObject::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef SCA_IObject::Attributes[] = { + { NULL } //Sentinel +}; PyObject* SCA_IObject::_getattr(const char *attr) { diff --git a/source/gameengine/GameLogic/SCA_NANDController.cpp b/source/gameengine/GameLogic/SCA_NANDController.cpp index 0efa8da153a..18426d75582 100644 --- a/source/gameengine/GameLogic/SCA_NANDController.cpp +++ b/source/gameengine/GameLogic/SCA_NANDController.cpp @@ -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); } diff --git a/source/gameengine/GameLogic/SCA_NORController.cpp b/source/gameengine/GameLogic/SCA_NORController.cpp index fa24be9ebce..1de6a641c3d 100644 --- a/source/gameengine/GameLogic/SCA_NORController.cpp +++ b/source/gameengine/GameLogic/SCA_NORController.cpp @@ -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); } diff --git a/source/gameengine/GameLogic/SCA_ORController.cpp b/source/gameengine/GameLogic/SCA_ORController.cpp index 42a29e1959b..61fbc889d90 100644 --- a/source/gameengine/GameLogic/SCA_ORController.cpp +++ b/source/gameengine/GameLogic/SCA_ORController.cpp @@ -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); } diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index 92852ee03cb..c75e36acab2 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -264,6 +264,9 @@ PyMethodDef SCA_PythonController::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef SCA_PythonController::Attributes[] = { + { NULL } //Sentinel +}; bool SCA_PythonController::Compile() { diff --git a/source/gameengine/GameLogic/SCA_XNORController.cpp b/source/gameengine/GameLogic/SCA_XNORController.cpp index b019aedc93d..b2734dd1b33 100644 --- a/source/gameengine/GameLogic/SCA_XNORController.cpp +++ b/source/gameengine/GameLogic/SCA_XNORController.cpp @@ -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); } diff --git a/source/gameengine/GameLogic/SCA_XORController.cpp b/source/gameengine/GameLogic/SCA_XORController.cpp index 11ffa19b8f1..662ef523d56 100644 --- a/source/gameengine/GameLogic/SCA_XORController.cpp +++ b/source/gameengine/GameLogic/SCA_XORController.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/BL_Shader.cpp b/source/gameengine/Ketsji/BL_Shader.cpp index e8281201d24..60cb288436a 100644 --- a/source/gameengine/Ketsji/BL_Shader.cpp +++ b/source/gameengine/Ketsji/BL_Shader.cpp @@ -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) diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp index 31f1d2dd3ee..4e5f27df2da 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp index cb9956d4616..ac89d8b0716 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp @@ -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! } diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp index 5fa19924267..b9bd7647f89 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp @@ -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) diff --git a/source/gameengine/Ketsji/KX_CDActuator.cpp b/source/gameengine/Ketsji/KX_CDActuator.cpp index 7d238e28add..ef7883910fd 100644 --- a/source/gameengine/Ketsji/KX_CDActuator.cpp +++ b/source/gameengine/Ketsji/KX_CDActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index 99e2d3b7c06..5caac2fc670 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -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" diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index 8a7ff41dfa6..fba9544d702 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp index 9ceb4a05b06..f014c1896fe 100644 --- a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp @@ -130,3 +130,7 @@ PyMethodDef KX_ConstraintWrapper::Methods[] = { {"getConstraintId",(PyCFunction) KX_ConstraintWrapper::sPyGetConstraintId, METH_VARARGS}, {NULL,NULL} //Sentinel }; + +PyAttributeDef KX_ConstraintWrapper::Attributes[] = { + { NULL } //Sentinel +}; diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp index 3090c668f03..3c0695b5952 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.cpp +++ b/source/gameengine/Ketsji/KX_GameActuator.cpp @@ -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" diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 9c6bd2edf0e..95df9d51a26 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1033,6 +1033,9 @@ PyMethodDef KX_GameObject::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef KX_GameObject::Attributes[] = { + { NULL } //Sentinel +}; /* diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index ca8419666b5..623a939bf62 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 36700265260..a2e93ecdd36 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -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" diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 4b949903c88..a0c0a496c06 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -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); diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index afe4cd1e2a4..384034485e7 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KX_NearSensor.cpp b/source/gameengine/Ketsji/KX_NearSensor.cpp index d859f670b07..066387abb93 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.cpp +++ b/source/gameengine/Ketsji/KX_NearSensor.cpp @@ -318,6 +318,9 @@ PyMethodDef KX_NearSensor::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef KX_NearSensor::Attributes[] = { + { NULL } //Sentinel +}; PyObject* KX_NearSensor::_getattr(const char *attr) diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index b647c72fc10..0666261b470 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -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); }; diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp index 5a908186235..84d7ccb9c05 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.cpp +++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp @@ -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")) { diff --git a/source/gameengine/Ketsji/KX_PolyProxy.cpp b/source/gameengine/Ketsji/KX_PolyProxy.cpp index ff962d57c9d..b4bdd77fb66 100644 --- a/source/gameengine/Ketsji/KX_PolyProxy.cpp +++ b/source/gameengine/Ketsji/KX_PolyProxy.cpp @@ -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")) diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp index 52c5b013e65..bbaf697b168 100644 --- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp +++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp @@ -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) diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp index 2ba1126a633..c347faaee1a 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.cpp +++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp @@ -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); } diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index c7cb53f64ed..ce12b983147 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -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"; diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp index 017ab5d6c97..68b704f4889 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp index 1aba05c1d83..394bb667728 100644 --- a/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp @@ -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) diff --git a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp index 443921d22b0..9268a1df5f0 100644 --- a/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp index ccc3b8fdb18..502990b2b27 100644 --- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 5ae1abc6a89..073cfc98bf1 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -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, diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp index 8e33177cf3a..1cad4e21352 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.cpp +++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp @@ -268,7 +268,9 @@ PyMethodDef KX_SceneActuator::Methods[] = {NULL,NULL} //Sentinel }; - +PyAttributeDef KX_SceneActuator::Attributes[] = { + { NULL } //Sentinel +}; PyObject* KX_SceneActuator::_getattr(const char *attr) { diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 562c096d440..6de1d67bfdb 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -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) { diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp index cd5c5d29ab1..0de4da79bd8 100644 --- a/source/gameengine/Ketsji/KX_StateActuator.cpp +++ b/source/gameengine/Ketsji/KX_StateActuator.cpp @@ -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); diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index 9d4fa14ad8e..8637bc92d39 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -468,6 +468,9 @@ PyMethodDef KX_TrackToActuator::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef KX_TrackToActuator::Attributes[] = { + { NULL } //Sentinel +}; PyObject* KX_TrackToActuator::_getattr(const char *attr) diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp index 057e10f195a..8d5af1b9216 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp @@ -382,3 +382,6 @@ PyMethodDef KX_VehicleWrapper::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef KX_VehicleWrapper::Attributes[] = { + { NULL } //Sentinel +}; diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp index 1c427768b66..da0e3dbdd8d 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.cpp +++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp @@ -78,6 +78,10 @@ PyMethodDef KX_VertexProxy::Methods[] = { {NULL,NULL} //Sentinel }; +PyAttributeDef KX_VertexProxy::Attributes[] = { + { NULL } //Sentinel +}; + PyObject* KX_VertexProxy::_getattr(const char *attr) { diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp index ca89a63de62..0ec280080bd 100644 --- a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp +++ b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp @@ -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); |