diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-07-24 01:37:37 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-07-24 01:37:37 +0400 |
commit | 5eb14d70b9c70d155291446ad662ede658f69e6d (patch) | |
tree | 48b29a0951966c3ccfcb906ecbaf39f7ee7b7f3f /source/gameengine/Ketsji | |
parent | dcbe9ade7a8ca91258742e3ac3abefa1c8108e0f (diff) |
BGE patch: Add PyDoc for new logic bricks, set exception message on Py error, remove args on Py functions that don't take any to save CPU time
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintActuator.cpp | 79 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintActuator.h | 24 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 20 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_IpoActuator.cpp | 44 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_IpoActuator.h | 12 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ObjectActuator.cpp | 77 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_ObjectActuator.h | 22 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_PythonInit.cpp | 9 |
8 files changed, 137 insertions, 150 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index 800416b5f0a..2401d69d3a3 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -237,9 +237,9 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) case KX_ACT_CONSTRAINT_DIRPX: case KX_ACT_CONSTRAINT_DIRPY: case KX_ACT_CONSTRAINT_DIRPZ: - case KX_ACT_CONSTRAINT_DIRMX: - case KX_ACT_CONSTRAINT_DIRMY: - case KX_ACT_CONSTRAINT_DIRMZ: + case KX_ACT_CONSTRAINT_DIRNX: + case KX_ACT_CONSTRAINT_DIRNY: + case KX_ACT_CONSTRAINT_DIRNZ: switch (m_locrot) { case KX_ACT_CONSTRAINT_DIRPX: direction[0] = rotation[0][0]; @@ -262,21 +262,21 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) axis = 2; sign = 1; break; - case KX_ACT_CONSTRAINT_DIRMX: + case KX_ACT_CONSTRAINT_DIRNX: direction[0] = -rotation[0][0]; direction[1] = -rotation[1][0]; direction[2] = -rotation[2][0]; axis = 0; sign = 0; break; - case KX_ACT_CONSTRAINT_DIRMY: + case KX_ACT_CONSTRAINT_DIRNY: direction[0] = -rotation[0][1]; direction[1] = -rotation[1][1]; direction[2] = -rotation[2][1]; axis = 1; sign = 0; break; - case KX_ACT_CONSTRAINT_DIRMZ: + case KX_ACT_CONSTRAINT_DIRNZ: direction[0] = -rotation[0][2]; direction[1] = -rotation[1][2]; direction[2] = -rotation[2][2]; @@ -437,27 +437,27 @@ PyParentObject KX_ConstraintActuator::Parents[] = { PyMethodDef KX_ConstraintActuator::Methods[] = { {"setDamp", (PyCFunction) KX_ConstraintActuator::sPySetDamp, METH_VARARGS, SetDamp_doc}, - {"getDamp", (PyCFunction) KX_ConstraintActuator::sPyGetDamp, METH_VARARGS, GetDamp_doc}, + {"getDamp", (PyCFunction) KX_ConstraintActuator::sPyGetDamp, METH_NOARGS, GetDamp_doc}, {"setRotDamp", (PyCFunction) KX_ConstraintActuator::sPySetRotDamp, METH_VARARGS, SetRotDamp_doc}, - {"getRotDamp", (PyCFunction) KX_ConstraintActuator::sPyGetRotDamp, METH_VARARGS, GetRotDamp_doc}, + {"getRotDamp", (PyCFunction) KX_ConstraintActuator::sPyGetRotDamp, METH_NOARGS, GetRotDamp_doc}, {"setDirection", (PyCFunction) KX_ConstraintActuator::sPySetDirection, METH_VARARGS, SetDirection_doc}, - {"getDirection", (PyCFunction) KX_ConstraintActuator::sPyGetDirection, METH_VARARGS, GetDirection_doc}, + {"getDirection", (PyCFunction) KX_ConstraintActuator::sPyGetDirection, METH_NOARGS, GetDirection_doc}, {"setOption", (PyCFunction) KX_ConstraintActuator::sPySetOption, METH_VARARGS, SetOption_doc}, - {"getOption", (PyCFunction) KX_ConstraintActuator::sPyGetOption, METH_VARARGS, GetOption_doc}, + {"getOption", (PyCFunction) KX_ConstraintActuator::sPyGetOption, METH_NOARGS, GetOption_doc}, {"setTime", (PyCFunction) KX_ConstraintActuator::sPySetTime, METH_VARARGS, SetTime_doc}, - {"getTime", (PyCFunction) KX_ConstraintActuator::sPyGetTime, METH_VARARGS, GetTime_doc}, + {"getTime", (PyCFunction) KX_ConstraintActuator::sPyGetTime, METH_NOARGS, GetTime_doc}, {"setProperty", (PyCFunction) KX_ConstraintActuator::sPySetProperty, METH_VARARGS, SetProperty_doc}, - {"getProperty", (PyCFunction) KX_ConstraintActuator::sPyGetProperty, METH_VARARGS, GetProperty_doc}, + {"getProperty", (PyCFunction) KX_ConstraintActuator::sPyGetProperty, METH_NOARGS, GetProperty_doc}, {"setMin", (PyCFunction) KX_ConstraintActuator::sPySetMin, METH_VARARGS, SetMin_doc}, - {"getMin", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_VARARGS, GetMin_doc}, + {"getMin", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_NOARGS, GetMin_doc}, {"setDistance", (PyCFunction) KX_ConstraintActuator::sPySetMin, METH_VARARGS, SetDistance_doc}, - {"getDistance", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_VARARGS, GetDistance_doc}, + {"getDistance", (PyCFunction) KX_ConstraintActuator::sPyGetMin, METH_NOARGS, GetDistance_doc}, {"setMax", (PyCFunction) KX_ConstraintActuator::sPySetMax, METH_VARARGS, SetMax_doc}, - {"getMax", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_VARARGS, GetMax_doc}, + {"getMax", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_NOARGS, GetMax_doc}, {"setRayLength", (PyCFunction) KX_ConstraintActuator::sPySetMax, METH_VARARGS, SetRayLength_doc}, - {"getRayLength", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_VARARGS, GetRayLength_doc}, + {"getRayLength", (PyCFunction) KX_ConstraintActuator::sPyGetMax, METH_NOARGS, GetRayLength_doc}, {"setLimit", (PyCFunction) KX_ConstraintActuator::sPySetLimit, METH_VARARGS, SetLimit_doc}, - {"getLimit", (PyCFunction) KX_ConstraintActuator::sPyGetLimit, METH_VARARGS, GetLimit_doc}, + {"getLimit", (PyCFunction) KX_ConstraintActuator::sPyGetLimit, METH_NOARGS, GetLimit_doc}, {NULL,NULL} //Sentinel }; @@ -476,6 +476,7 @@ PyObject* KX_ConstraintActuator::PySetDamp(PyObject* self, PyObject* kwds) { int dampArg; if(!PyArg_ParseTuple(args, "i", &dampArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -488,9 +489,7 @@ PyObject* KX_ConstraintActuator::PySetDamp(PyObject* self, char KX_ConstraintActuator::GetDamp_doc[] = "getDamp()\n" "\tReturns the damping parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetDamp(PyObject* self, - PyObject* args, - PyObject* kwds){ +PyObject* KX_ConstraintActuator::PyGetDamp(PyObject* self){ return PyInt_FromLong(m_posDampTime); } @@ -505,6 +504,7 @@ PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* self, PyObject* kwds) { int dampArg; if(!PyArg_ParseTuple(args, "i", &dampArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -517,9 +517,7 @@ PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* self, char KX_ConstraintActuator::GetRotDamp_doc[] = "getRotDamp()\n" "\tReturns the damping time for application of the constraint.\n"; -PyObject* KX_ConstraintActuator::PyGetRotDamp(PyObject* self, - PyObject* args, - PyObject* kwds){ +PyObject* KX_ConstraintActuator::PyGetRotDamp(PyObject* self){ return PyInt_FromLong(m_rotDampTime); } @@ -536,6 +534,7 @@ PyObject* KX_ConstraintActuator::PySetDirection(PyObject* self, MT_Vector3 dir; if(!PyArg_ParseTuple(args, "(fff)", &x, &y, &z)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } dir[0] = x; @@ -554,9 +553,7 @@ PyObject* KX_ConstraintActuator::PySetDirection(PyObject* self, char KX_ConstraintActuator::GetDirection_doc[] = "getDirection()\n" "\tReturns the reference direction of the orientation constraint as a 3-tuple.\n"; -PyObject* KX_ConstraintActuator::PyGetDirection(PyObject* self, - PyObject* args, - PyObject* kwds){ +PyObject* KX_ConstraintActuator::PyGetDirection(PyObject* self){ PyObject *retVal = PyList_New(3); PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_refDirection[0])); @@ -580,6 +577,7 @@ PyObject* KX_ConstraintActuator::PySetOption(PyObject* self, PyObject* kwds) { int option; if(!PyArg_ParseTuple(args, "i", &option)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -591,9 +589,7 @@ PyObject* KX_ConstraintActuator::PySetOption(PyObject* self, char KX_ConstraintActuator::GetOption_doc[] = "getOption()\n" "\tReturns the option parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetOption(PyObject* self, - PyObject* args, - PyObject* kwds){ +PyObject* KX_ConstraintActuator::PyGetOption(PyObject* self){ return PyInt_FromLong(m_option); } @@ -609,6 +605,7 @@ PyObject* KX_ConstraintActuator::PySetTime(PyObject* self, PyObject* kwds) { int t; if(!PyArg_ParseTuple(args, "i", &t)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -622,9 +619,7 @@ PyObject* KX_ConstraintActuator::PySetTime(PyObject* self, char KX_ConstraintActuator::GetTime_doc[] = "getTime()\n" "\tReturns the time parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetTime(PyObject* self, - PyObject* args, - PyObject* kwds){ +PyObject* KX_ConstraintActuator::PyGetTime(PyObject* self){ return PyInt_FromLong(m_activeTime); } @@ -639,6 +634,7 @@ PyObject* KX_ConstraintActuator::PySetProperty(PyObject* self, PyObject* kwds) { char *property; if (!PyArg_ParseTuple(args, "s", &property)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } if (property == NULL) { @@ -654,9 +650,7 @@ PyObject* KX_ConstraintActuator::PySetProperty(PyObject* self, char KX_ConstraintActuator::GetProperty_doc[] = "getProperty()\n" "\tReturns the property parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetProperty(PyObject* self, - PyObject* args, - PyObject* kwds){ +PyObject* KX_ConstraintActuator::PyGetProperty(PyObject* self){ return PyString_FromString(m_property); } @@ -676,6 +670,7 @@ PyObject* KX_ConstraintActuator::PySetMin(PyObject* self, PyObject* kwds) { float minArg; if(!PyArg_ParseTuple(args, "f", &minArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -701,9 +696,7 @@ char KX_ConstraintActuator::GetMin_doc[] = "getMin()\n" "\tReturns the lower value of the interval to which the value\n" "\tis clipped.\n"; -PyObject* KX_ConstraintActuator::PyGetMin(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PyGetMin(PyObject* self) { return PyFloat_FromDouble(m_minimumBound); } @@ -723,6 +716,7 @@ PyObject* KX_ConstraintActuator::PySetMax(PyObject* self, PyObject* kwds){ float maxArg; if(!PyArg_ParseTuple(args, "f", &maxArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -748,9 +742,7 @@ char KX_ConstraintActuator::GetMax_doc[] = "getMax()\n" "\tReturns the upper value of the interval to which the value\n" "\tis clipped.\n"; -PyObject* KX_ConstraintActuator::PyGetMax(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PyGetMax(PyObject* self) { return PyFloat_FromDouble(m_maximumBound); } @@ -778,6 +770,7 @@ PyObject* KX_ConstraintActuator::PySetLimit(PyObject* self, PyObject* kwds) { int locrotArg; if(!PyArg_ParseTuple(args, "i", &locrotArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -789,9 +782,7 @@ PyObject* KX_ConstraintActuator::PySetLimit(PyObject* self, char KX_ConstraintActuator::GetLimit_doc[] = "getLimit()\n" "\tReturns the type of constraint.\n"; -PyObject* KX_ConstraintActuator::PyGetLimit(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PyGetLimit(PyObject* self) { return PyInt_FromLong(m_locrot); } diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index 3ef51595098..d9f39124cac 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -84,9 +84,9 @@ protected: KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, - KX_ACT_CONSTRAINT_DIRMX, - KX_ACT_CONSTRAINT_DIRMY, - KX_ACT_CONSTRAINT_DIRMZ, + KX_ACT_CONSTRAINT_DIRNX, + KX_ACT_CONSTRAINT_DIRNY, + KX_ACT_CONSTRAINT_DIRNZ, KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ, @@ -131,27 +131,27 @@ protected: virtual PyObject* _getattr(const STR_String& attr); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetDamp); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetDamp); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetDamp); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetRotDamp); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetRotDamp); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetRotDamp); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetDirection); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetDirection); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetDirection); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetOption); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetOption); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetOption); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetTime); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetTime); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetTime); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetProperty); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetProperty); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetProperty); KX_PYMETHOD_DOC(KX_ConstraintActuator,SetMin); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetMin); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetMin); static char SetDistance_doc[]; static char GetDistance_doc[]; KX_PYMETHOD_DOC(KX_ConstraintActuator,SetMax); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetMax); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetMax); static char SetRayLength_doc[]; static char GetRayLength_doc[]; KX_PYMETHOD_DOC(KX_ConstraintActuator,SetLimit); - KX_PYMETHOD_DOC(KX_ConstraintActuator,GetLimit); + KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetLimit); }; #endif //__KX_CONSTRAINTACTUATOR diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index cdcba8abb4d..6c8b32b6d24 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1568,8 +1568,10 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo, float dist = 0.0f; char *propName = NULL; - if (!PyArg_ParseTuple(args,"O|fs", &pyarg, &dist, &propName)) + if (!PyArg_ParseTuple(args,"O|fs", &pyarg, &dist, &propName)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; + } if (!PyVecTo(pyarg, toPoint)) { @@ -1616,11 +1618,11 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCastTo, } KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, -"rayCast(to,from,dist,prop): cast a ray and return tuple (object,hit,normal) of contact point with object within dist that matches prop or None if no hit\n" + "rayCast(to,from,dist,prop): cast a ray and return tuple (object,hit,normal) of contact point with object within dist that matches prop or (None,None,None) tuple if no hit\n" " prop = property name that object must have; can be omitted => detect any object\n" " dist = max distance to look (can be negative => look behind); 0 or omitted => detect up to to\n" " from = 3-tuple or object reference for origin of ray (if object, use center of object)\n" -" Can None or omitted => start from self object center\n" +" Can be None or omitted => start from self object center\n" " to = 3-tuple or object reference for destination of ray (if object, use center of object)\n" "Note: the object on which you call this method matters: the ray will ignore it if it goes through it\n") { @@ -1632,8 +1634,10 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, char *propName = NULL; KX_GameObject *other; - if (!PyArg_ParseTuple(args,"O|Ofs", &pyto, &pyfrom, &dist, &propName)) + if (!PyArg_ParseTuple(args,"O|Ofs", &pyto, &pyfrom, &dist, &propName)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; + } if (!PyVecTo(pyto, toPoint)) { @@ -1691,16 +1695,14 @@ KX_PYMETHODDEF_DOC(KX_GameObject, rayCast, if (m_pHitObject) { PyObject* returnValue = PyTuple_New(3); - if (!returnValue) + if (!returnValue) { + PyErr_SetString(PyExc_TypeError, "PyTuple_New() failed"); return NULL; + } PyTuple_SET_ITEM(returnValue, 0, m_pHitObject->AddRef()); PyTuple_SET_ITEM(returnValue, 1, PyObjectFrom(resultPoint)); PyTuple_SET_ITEM(returnValue, 2, PyObjectFrom(resultNormal)); return returnValue; - //return Py_BuildValue("(O,(fff),(fff))", - // m_pHitObject->AddRef(), // trick: KX_GameObject are not true Python object, they use a difference reference count system - // resultPoint[0], resultPoint[1], resultPoint[2], - // resultNormal[0], resultNormal[1], resultNormal[2]); } return Py_BuildValue("OOO", Py_None, Py_None, Py_None); //Py_RETURN_NONE; diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index b7103f49aee..af3add8a323 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -430,27 +430,27 @@ PyMethodDef KX_IpoActuator::Methods[] = { {"setStart", (PyCFunction) KX_IpoActuator::sPySetStart, METH_VARARGS, SetStart_doc}, {"getStart", (PyCFunction) KX_IpoActuator::sPyGetStart, - METH_VARARGS, GetStart_doc}, + METH_NOARGS, GetStart_doc}, {"setEnd", (PyCFunction) KX_IpoActuator::sPySetEnd, METH_VARARGS, SetEnd_doc}, {"getEnd", (PyCFunction) KX_IpoActuator::sPyGetEnd, - METH_VARARGS, GetEnd_doc}, + METH_NOARGS, GetEnd_doc}, {"setIpoAsForce", (PyCFunction) KX_IpoActuator::sPySetIpoAsForce, METH_VARARGS, SetIpoAsForce_doc}, {"getIpoAsForce", (PyCFunction) KX_IpoActuator::sPyGetIpoAsForce, - METH_VARARGS, GetIpoAsForce_doc}, + METH_NOARGS, GetIpoAsForce_doc}, {"setIpoAdd", (PyCFunction) KX_IpoActuator::sPySetIpoAdd, METH_VARARGS, SetIpoAdd_doc}, {"getIpoAdd", (PyCFunction) KX_IpoActuator::sPyGetIpoAdd, - METH_VARARGS, GetIpoAdd_doc}, + METH_NOARGS, GetIpoAdd_doc}, {"setType", (PyCFunction) KX_IpoActuator::sPySetType, METH_VARARGS, SetType_doc}, {"getType", (PyCFunction) KX_IpoActuator::sPyGetType, - METH_VARARGS, GetType_doc}, + METH_NOARGS, GetType_doc}, {"setForceIpoActsLocal", (PyCFunction) KX_IpoActuator::sPySetForceIpoActsLocal, METH_VARARGS, SetForceIpoActsLocal_doc}, {"getForceIpoActsLocal", (PyCFunction) KX_IpoActuator::sPyGetForceIpoActsLocal, - METH_VARARGS, GetForceIpoActsLocal_doc}, + METH_NOARGS, GetForceIpoActsLocal_doc}, {NULL,NULL} //Sentinel }; @@ -480,6 +480,7 @@ PyObject* KX_IpoActuator::PySet(PyObject* self, int startFrame, stopFrame; if(!PyArg_ParseTuple(args, "siii", &mode, &startFrame, &stopFrame, &forceToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } modenum = string2mode(mode); @@ -515,6 +516,7 @@ PyObject* KX_IpoActuator::PySetProperty(PyObject* self, /* args: property */ char *propertyName; if(!PyArg_ParseTuple(args, "s", &propertyName)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -533,6 +535,7 @@ PyObject* KX_IpoActuator::PySetStart(PyObject* self, PyObject* kwds) { float startArg; if(!PyArg_ParseTuple(args, "f", &startArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -544,9 +547,7 @@ PyObject* KX_IpoActuator::PySetStart(PyObject* self, char KX_IpoActuator::GetStart_doc[] = "getStart()\n" "\tReturns the frame from which the ipo starts playing.\n"; -PyObject* KX_IpoActuator::PyGetStart(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PyGetStart(PyObject* self) { return PyFloat_FromDouble(m_startframe); } @@ -560,6 +561,7 @@ PyObject* KX_IpoActuator::PySetEnd(PyObject* self, PyObject* kwds) { float endArg; if(!PyArg_ParseTuple(args, "f", &endArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -571,9 +573,7 @@ PyObject* KX_IpoActuator::PySetEnd(PyObject* self, char KX_IpoActuator::GetEnd_doc[] = "getEnd()\n" "\tReturns the frame at which the ipo stops playing.\n"; -PyObject* KX_IpoActuator::PyGetEnd(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PyGetEnd(PyObject* self) { return PyFloat_FromDouble(m_endframe); } @@ -588,6 +588,7 @@ PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* self, int boolArg; if (!PyArg_ParseTuple(args, "i", &boolArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -601,9 +602,7 @@ PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* self, char KX_IpoActuator::GetIpoAsForce_doc[] = "getIpoAsForce()\n" "\tReturns whether to interpret the ipo as a force rather than a displacement.\n"; -PyObject* KX_IpoActuator::PyGetIpoAsForce(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PyGetIpoAsForce(PyObject* self) { return BoolToPyArg(m_ipo_as_force); } @@ -618,6 +617,7 @@ PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* self, int boolArg; if (!PyArg_ParseTuple(args, "i", &boolArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -631,9 +631,7 @@ PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* self, char KX_IpoActuator::GetIpoAdd_doc[] = "getIpoAsAdd()\n" "\tReturns whether to interpret the ipo as additive rather than absolute.\n"; -PyObject* KX_IpoActuator::PyGetIpoAdd(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PyGetIpoAdd(PyObject* self) { return BoolToPyArg(m_ipo_add); } @@ -648,6 +646,7 @@ PyObject* KX_IpoActuator::PySetType(PyObject* self, int typeArg; if (!PyArg_ParseTuple(args, "i", &typeArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -662,9 +661,7 @@ PyObject* KX_IpoActuator::PySetType(PyObject* self, char KX_IpoActuator::GetType_doc[] = "getType()\n" "\tReturns the operation mode of the actuator.\n"; -PyObject* KX_IpoActuator::PyGetType(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PyGetType(PyObject* self) { return PyInt_FromLong(m_type); } @@ -681,6 +678,7 @@ PyObject* KX_IpoActuator::PySetForceIpoActsLocal(PyObject* self, int boolArg; if (!PyArg_ParseTuple(args, "i", &boolArg)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } @@ -693,9 +691,7 @@ char KX_IpoActuator::GetForceIpoActsLocal_doc[] = "getForceIpoActsLocal()\n" "\tReturn whether to apply the force in the object's local\n" "\tcoordinates rather than the world global coordinates.\n"; -PyObject* KX_IpoActuator::PyGetForceIpoActsLocal(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PyGetForceIpoActsLocal(PyObject* self) { return BoolToPyArg(m_ipo_local); } diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index ae554fb0fce..d6f52f8d59d 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -143,17 +143,17 @@ public: KX_PYMETHOD_DOC(KX_IpoActuator,SetProperty); /* KX_PYMETHOD_DOC(KX_IpoActuator,SetKey2Key); */ KX_PYMETHOD_DOC(KX_IpoActuator,SetStart); - KX_PYMETHOD_DOC(KX_IpoActuator,GetStart); + KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetStart); KX_PYMETHOD_DOC(KX_IpoActuator,SetEnd); - KX_PYMETHOD_DOC(KX_IpoActuator,GetEnd); + KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetEnd); KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAsForce); - KX_PYMETHOD_DOC(KX_IpoActuator,GetIpoAsForce); + KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetIpoAsForce); KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAdd); - KX_PYMETHOD_DOC(KX_IpoActuator,GetIpoAdd); + KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetIpoAdd); KX_PYMETHOD_DOC(KX_IpoActuator,SetType); - KX_PYMETHOD_DOC(KX_IpoActuator,GetType); + KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetType); KX_PYMETHOD_DOC(KX_IpoActuator,SetForceIpoActsLocal); - KX_PYMETHOD_DOC(KX_IpoActuator,GetForceIpoActsLocal); + KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetForceIpoActsLocal); }; diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 9ac0b4d4703..5cd4d089c14 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -304,27 +304,27 @@ PyParentObject KX_ObjectActuator::Parents[] = { }; PyMethodDef KX_ObjectActuator::Methods[] = { - {"getForce", (PyCFunction) KX_ObjectActuator::sPyGetForce, METH_VARARGS}, + {"getForce", (PyCFunction) KX_ObjectActuator::sPyGetForce, METH_NOARGS}, {"setForce", (PyCFunction) KX_ObjectActuator::sPySetForce, METH_VARARGS}, - {"getTorque", (PyCFunction) KX_ObjectActuator::sPyGetTorque, METH_VARARGS}, + {"getTorque", (PyCFunction) KX_ObjectActuator::sPyGetTorque, METH_NOARGS}, {"setTorque", (PyCFunction) KX_ObjectActuator::sPySetTorque, METH_VARARGS}, - {"getDLoc", (PyCFunction) KX_ObjectActuator::sPyGetDLoc, METH_VARARGS}, + {"getDLoc", (PyCFunction) KX_ObjectActuator::sPyGetDLoc, METH_NOARGS}, {"setDLoc", (PyCFunction) KX_ObjectActuator::sPySetDLoc, METH_VARARGS}, - {"getDRot", (PyCFunction) KX_ObjectActuator::sPyGetDRot, METH_VARARGS}, + {"getDRot", (PyCFunction) KX_ObjectActuator::sPyGetDRot, METH_NOARGS}, {"setDRot", (PyCFunction) KX_ObjectActuator::sPySetDRot, METH_VARARGS}, - {"getLinearVelocity", (PyCFunction) KX_ObjectActuator::sPyGetLinearVelocity, METH_VARARGS}, + {"getLinearVelocity", (PyCFunction) KX_ObjectActuator::sPyGetLinearVelocity, METH_NOARGS}, {"setLinearVelocity", (PyCFunction) KX_ObjectActuator::sPySetLinearVelocity, METH_VARARGS}, - {"getAngularVelocity", (PyCFunction) KX_ObjectActuator::sPyGetAngularVelocity, METH_VARARGS}, + {"getAngularVelocity", (PyCFunction) KX_ObjectActuator::sPyGetAngularVelocity, METH_NOARGS}, {"setAngularVelocity", (PyCFunction) KX_ObjectActuator::sPySetAngularVelocity, METH_VARARGS}, {"setDamping", (PyCFunction) KX_ObjectActuator::sPySetDamping, METH_VARARGS}, - {"getDamping", (PyCFunction) KX_ObjectActuator::sPyGetDamping, METH_VARARGS}, + {"getDamping", (PyCFunction) KX_ObjectActuator::sPyGetDamping, METH_NOARGS}, {"setForceLimitX", (PyCFunction) KX_ObjectActuator::sPySetForceLimitX, METH_VARARGS}, - {"getForceLimitX", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitX, METH_VARARGS}, + {"getForceLimitX", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitX, METH_NOARGS}, {"setForceLimitY", (PyCFunction) KX_ObjectActuator::sPySetForceLimitY, METH_VARARGS}, - {"getForceLimitY", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitY, METH_VARARGS}, + {"getForceLimitY", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitY, METH_NOARGS}, {"setForceLimitZ", (PyCFunction) KX_ObjectActuator::sPySetForceLimitZ, METH_VARARGS}, - {"getForceLimitZ", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitZ, METH_VARARGS}, - {"setPID", (PyCFunction) KX_ObjectActuator::sPyGetPID, METH_VARARGS}, + {"getForceLimitZ", (PyCFunction) KX_ObjectActuator::sPyGetForceLimitZ, METH_NOARGS}, + {"setPID", (PyCFunction) KX_ObjectActuator::sPyGetPID, METH_NOARGS}, {"getPID", (PyCFunction) KX_ObjectActuator::sPySetPID, METH_VARARGS}, @@ -340,9 +340,7 @@ PyObject* KX_ObjectActuator::_getattr(const STR_String& attr) { /* Removed! */ /* 2. getForce */ -PyObject* KX_ObjectActuator::PyGetForce(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetForce(PyObject* self) { PyObject *retVal = PyList_New(4); @@ -362,6 +360,7 @@ PyObject* KX_ObjectActuator::PySetForce(PyObject* self, int bToggle = 0; if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], &vecArg[2], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_force.setValue(vecArg); @@ -371,9 +370,7 @@ PyObject* KX_ObjectActuator::PySetForce(PyObject* self, } /* 4. getTorque */ -PyObject* KX_ObjectActuator::PyGetTorque(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetTorque(PyObject* self) { PyObject *retVal = PyList_New(4); @@ -393,6 +390,7 @@ PyObject* KX_ObjectActuator::PySetTorque(PyObject* self, int bToggle = 0; if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], &vecArg[2], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_torque.setValue(vecArg); @@ -402,9 +400,7 @@ PyObject* KX_ObjectActuator::PySetTorque(PyObject* self, } /* 6. getDLoc */ -PyObject* KX_ObjectActuator::PyGetDLoc(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetDLoc(PyObject* self) { PyObject *retVal = PyList_New(4); @@ -424,6 +420,7 @@ PyObject* KX_ObjectActuator::PySetDLoc(PyObject* self, int bToggle = 0; if(!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], &vecArg[2], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_dloc.setValue(vecArg); @@ -433,9 +430,7 @@ PyObject* KX_ObjectActuator::PySetDLoc(PyObject* self, } /* 8. getDRot */ -PyObject* KX_ObjectActuator::PyGetDRot(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetDRot(PyObject* self) { PyObject *retVal = PyList_New(4); @@ -455,6 +450,7 @@ PyObject* KX_ObjectActuator::PySetDRot(PyObject* self, int bToggle = 0; if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], &vecArg[2], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_drot.setValue(vecArg); @@ -464,9 +460,7 @@ PyObject* KX_ObjectActuator::PySetDRot(PyObject* self, } /* 10. getLinearVelocity */ -PyObject* KX_ObjectActuator::PyGetLinearVelocity(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ObjectActuator::PyGetLinearVelocity(PyObject* self) { PyObject *retVal = PyList_New(4); PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_linear_velocity[0])); @@ -485,6 +479,7 @@ PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* self, int bToggle = 0; if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], &vecArg[2], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_linear_velocity.setValue(vecArg); @@ -495,9 +490,7 @@ PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* self, /* 12. getAngularVelocity */ -PyObject* KX_ObjectActuator::PyGetAngularVelocity(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ObjectActuator::PyGetAngularVelocity(PyObject* self) { PyObject *retVal = PyList_New(4); PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_angular_velocity[0])); @@ -515,6 +508,7 @@ PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* self, int bToggle = 0; if (!PyArg_ParseTuple(args, "fffi", &vecArg[0], &vecArg[1], &vecArg[2], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_angular_velocity.setValue(vecArg); @@ -529,6 +523,7 @@ PyObject* KX_ObjectActuator::PySetDamping(PyObject* self, PyObject* kwds) { int damping = 0; if (!PyArg_ParseTuple(args, "i", &damping) || damping < 0 || damping > 1000) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_damping = damping; @@ -536,15 +531,11 @@ PyObject* KX_ObjectActuator::PySetDamping(PyObject* self, } /* 13. getVelocityDamping */ -PyObject* KX_ObjectActuator::PyGetDamping(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ObjectActuator::PyGetDamping(PyObject* self) { return Py_BuildValue("i",m_damping); } /* 6. getForceLimitX */ -PyObject* KX_ObjectActuator::PyGetForceLimitX(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetForceLimitX(PyObject* self) { PyObject *retVal = PyList_New(3); @@ -562,6 +553,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* self, float vecArg[2]; int bToggle = 0; if(!PyArg_ParseTuple(args, "ffi", &vecArg[0], &vecArg[1], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_drot[0] = vecArg[0]; @@ -571,9 +563,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* self, } /* 6. getForceLimitY */ -PyObject* KX_ObjectActuator::PyGetForceLimitY(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetForceLimitY(PyObject* self) { PyObject *retVal = PyList_New(3); @@ -591,6 +581,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* self, float vecArg[2]; int bToggle = 0; if(!PyArg_ParseTuple(args, "ffi", &vecArg[0], &vecArg[1], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_drot[1] = vecArg[0]; @@ -600,9 +591,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* self, } /* 6. getForceLimitZ */ -PyObject* KX_ObjectActuator::PyGetForceLimitZ(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetForceLimitZ(PyObject* self) { PyObject *retVal = PyList_New(3); @@ -620,6 +609,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* self, float vecArg[2]; int bToggle = 0; if(!PyArg_ParseTuple(args, "ffi", &vecArg[0], &vecArg[1], &bToggle)) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_drot[2] = vecArg[0]; @@ -629,9 +619,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* self, } /* 4. getPID */ -PyObject* KX_ObjectActuator::PyGetPID(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PyGetPID(PyObject* self) { PyObject *retVal = PyList_New(3); @@ -648,6 +636,7 @@ PyObject* KX_ObjectActuator::PySetPID(PyObject* self, { float vecArg[3]; if (!PyArg_ParseTuple(args, "fff", &vecArg[0], &vecArg[1], &vecArg[2])) { + PyErr_SetString(PyExc_TypeError, "Invalid arguments"); return NULL; } m_torque.setValue(vecArg); diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index bb74756551f..aa686f41233 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -155,27 +155,27 @@ public: virtual PyObject* _getattr(const STR_String& attr); - KX_PYMETHOD(KX_ObjectActuator,GetForce); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForce); KX_PYMETHOD(KX_ObjectActuator,SetForce); - KX_PYMETHOD(KX_ObjectActuator,GetTorque); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetTorque); KX_PYMETHOD(KX_ObjectActuator,SetTorque); - KX_PYMETHOD(KX_ObjectActuator,GetDLoc); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDLoc); KX_PYMETHOD(KX_ObjectActuator,SetDLoc); - KX_PYMETHOD(KX_ObjectActuator,GetDRot); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDRot); KX_PYMETHOD(KX_ObjectActuator,SetDRot); - KX_PYMETHOD(KX_ObjectActuator,GetLinearVelocity); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetLinearVelocity); KX_PYMETHOD(KX_ObjectActuator,SetLinearVelocity); - KX_PYMETHOD(KX_ObjectActuator,GetAngularVelocity); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetAngularVelocity); KX_PYMETHOD(KX_ObjectActuator,SetAngularVelocity); KX_PYMETHOD(KX_ObjectActuator,SetDamping); - KX_PYMETHOD(KX_ObjectActuator,GetDamping); - KX_PYMETHOD(KX_ObjectActuator,GetForceLimitX); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDamping); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitX); KX_PYMETHOD(KX_ObjectActuator,SetForceLimitX); - KX_PYMETHOD(KX_ObjectActuator,GetForceLimitY); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitY); KX_PYMETHOD(KX_ObjectActuator,SetForceLimitY); - KX_PYMETHOD(KX_ObjectActuator,GetForceLimitZ); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitZ); KX_PYMETHOD(KX_ObjectActuator,SetForceLimitZ); - KX_PYMETHOD(KX_ObjectActuator,GetPID); + KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetPID); KX_PYMETHOD(KX_ObjectActuator,SetPID); }; diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 61ed8b6a8e4..b66c3e42606 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -756,6 +756,15 @@ PyObject* initGameLogic(KX_Scene* scene) // quick hack to get gravity hook KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_ROTX, KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTX); KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_ROTY, KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTY); KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_ROTZ, KX_ConstraintActuator::KX_ACT_CONSTRAINT_ROTZ); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_DIRPX, KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRPX); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_DIRPY, KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRPY); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_DIRPY, KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRPY); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_DIRNX, KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRNX); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_DIRNY, KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRNY); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_DIRNY, KX_ConstraintActuator::KX_ACT_CONSTRAINT_DIRNY); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_ORIX, KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIX); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_ORIY, KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIY); + KX_MACRO_addTypesToDict(d, KX_CONSTRAINTACT_ORIZ, KX_ConstraintActuator::KX_ACT_CONSTRAINT_ORIZ); /* 4. Ipo actuator, simple part */ KX_MACRO_addTypesToDict(d, KX_IPOACT_PLAY, KX_IpoActuator::KX_ACT_IPO_PLAY); |