diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-04-19 21:29:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-04-19 21:29:07 +0400 |
commit | 6bc162e679d8b52b28e205de76985a1735abbf0a (patch) | |
tree | 675375b547c1ba593f02fa9394273d95cfe57ae7 /source/gameengine/Ketsji | |
parent | fe08da3b4c4097c87c4ee1ee02e9218aaaffde4b (diff) |
BGE Python API
removed redundant (PyObject *self) argument from python functions that are not exposed to python directly.
Diffstat (limited to 'source/gameengine/Ketsji')
41 files changed, 317 insertions, 466 deletions
diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp index c3b27d4d6e6..2483a6bfb39 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp @@ -164,7 +164,6 @@ int KX_NetworkMessageActuator::py_setattro(PyObject *attr, PyObject *value) { // Deprecated -----> // 1. SetToPropName PyObject* KX_NetworkMessageActuator::PySetToPropName( - PyObject* self, PyObject* args, PyObject* kwds) { @@ -183,7 +182,6 @@ PyObject* KX_NetworkMessageActuator::PySetToPropName( // 2. SetSubject PyObject* KX_NetworkMessageActuator::PySetSubject( - PyObject* self, PyObject* args, PyObject* kwds) { @@ -202,7 +200,6 @@ PyObject* KX_NetworkMessageActuator::PySetSubject( // 3. SetBodyType PyObject* KX_NetworkMessageActuator::PySetBodyType( - PyObject* self, PyObject* args, PyObject* kwds) { @@ -221,7 +218,6 @@ PyObject* KX_NetworkMessageActuator::PySetBodyType( // 4. SetBody PyObject* KX_NetworkMessageActuator::PySetBody( - PyObject* self, PyObject* args, PyObject* kwds) { diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp index 9fd30450515..0c23c9b2712 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp @@ -257,7 +257,7 @@ const char KX_NetworkMessageSensor::SetSubjectFilterText_doc[] = "\tsetSubjectFilterText(value)\n" "\tChange the message subject text that this sensor is listening to.\n"; -PyObject* KX_NetworkMessageSensor::PySetSubjectFilterText( PyObject* self, PyObject* value) +PyObject* KX_NetworkMessageSensor::PySetSubjectFilterText(PyObject* value) { ShowDeprecationWarning("setSubjectFilterText()", "subject"); char* Subject = PyString_AsString(value); @@ -275,7 +275,7 @@ const char KX_NetworkMessageSensor::GetFrameMessageCount_doc[] = "\tgetFrameMessageCount()\n" "\tGet the number of messages received since the last frame.\n"; -PyObject* KX_NetworkMessageSensor::PyGetFrameMessageCount( PyObject* ) +PyObject* KX_NetworkMessageSensor::PyGetFrameMessageCount() { ShowDeprecationWarning("getFrameMessageCount()", "frameMessageCount"); return PyInt_FromLong(long(m_frame_message_count)); @@ -286,7 +286,7 @@ const char KX_NetworkMessageSensor::GetBodies_doc[] = "\tgetBodies()\n" "\tGet the list of message bodies.\n"; -PyObject* KX_NetworkMessageSensor::PyGetBodies( PyObject* ) +PyObject* KX_NetworkMessageSensor::PyGetBodies() { ShowDeprecationWarning("getBodies()", "bodies"); if (m_BodyList) { @@ -301,7 +301,7 @@ const char KX_NetworkMessageSensor::GetSubject_doc[] = "\tgetSubject()\n" "\tGet the subject: field of the message sensor.\n"; -PyObject* KX_NetworkMessageSensor::PyGetSubject( PyObject* ) +PyObject* KX_NetworkMessageSensor::PyGetSubject() { ShowDeprecationWarning("getSubject()", "subject"); return PyString_FromString(m_subject ? m_subject : ""); @@ -312,7 +312,7 @@ const char KX_NetworkMessageSensor::GetSubjects_doc[] = "\tgetSubjects()\n" "\tGet list of message subjects.\n"; -PyObject* KX_NetworkMessageSensor::PyGetSubjects( PyObject* ) +PyObject* KX_NetworkMessageSensor::PyGetSubjects() { ShowDeprecationWarning("getSubjects()", "subjects"); if (m_SubjectList) { diff --git a/source/gameengine/Ketsji/KX_CDActuator.cpp b/source/gameengine/Ketsji/KX_CDActuator.cpp index 56610f2e787..121d4512265 100644 --- a/source/gameengine/Ketsji/KX_CDActuator.cpp +++ b/source/gameengine/Ketsji/KX_CDActuator.cpp @@ -289,7 +289,7 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_CDActuator, playAll, } // Deprecated -----> -PyObject* KX_CDActuator::PySetGain(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_CDActuator::PySetGain(PyObject* args) { float gain = 1.0; ShowDeprecationWarning("setGain()", "the volume property"); @@ -303,7 +303,7 @@ PyObject* KX_CDActuator::PySetGain(PyObject* self, PyObject* args, PyObject* kwd -PyObject* KX_CDActuator::PyGetGain(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_CDActuator::PyGetGain(PyObject* args) { float gain = SND_CDObject::Instance()->GetGain(); ShowDeprecationWarning("getGain()", "the volume property"); diff --git a/source/gameengine/Ketsji/KX_CDActuator.h b/source/gameengine/Ketsji/KX_CDActuator.h index e7683297c7a..b674755e59f 100644 --- a/source/gameengine/Ketsji/KX_CDActuator.h +++ b/source/gameengine/Ketsji/KX_CDActuator.h @@ -85,8 +85,8 @@ public: virtual int py_setattro(PyObject *attr, PyObject *value); // Deprecated -----> - KX_PYMETHOD(KX_CDActuator,SetGain); - KX_PYMETHOD(KX_CDActuator,GetGain); + KX_PYMETHOD_VARARGS(KX_CDActuator,SetGain); + KX_PYMETHOD_VARARGS(KX_CDActuator,GetGain); // <----- KX_PYMETHOD_DOC_NOARGS(KX_CDActuator, startCD); diff --git a/source/gameengine/Ketsji/KX_CameraActuator.cpp b/source/gameengine/Ketsji/KX_CameraActuator.cpp index 35165af1f82..6cc48856a94 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.cpp +++ b/source/gameengine/Ketsji/KX_CameraActuator.cpp @@ -408,7 +408,7 @@ PyMethodDef KX_CameraActuator::Methods[] = { {"setHeight",(PyCFunction) KX_CameraActuator::sPySetHeight, METH_VARARGS, (PY_METHODCHAR)SetHeight_doc}, {"getHeight",(PyCFunction) KX_CameraActuator::sPyGetHeight, METH_NOARGS, (PY_METHODCHAR)GetHeight_doc}, {"setXY" ,(PyCFunction) KX_CameraActuator::sPySetXY, METH_VARARGS, (PY_METHODCHAR)SetXY_doc}, - {"getXY" ,(PyCFunction) KX_CameraActuator::sPyGetXY, METH_VARARGS, (PY_METHODCHAR)GetXY_doc}, + {"getXY" ,(PyCFunction) KX_CameraActuator::sPyGetXY, METH_NOARGS, (PY_METHODCHAR)GetXY_doc}, {NULL,NULL,NULL,NULL} //Sentinel }; @@ -434,7 +434,7 @@ const char KX_CameraActuator::GetObject_doc[] = "getObject(name_only = 1)\n" "name_only - optional arg, when true will return the KX_GameObject rather then its name\n" "\tReturns the object this sensor reacts to.\n"; -PyObject* KX_CameraActuator::PyGetObject(PyObject* self, PyObject* args) +PyObject* KX_CameraActuator::PyGetObject(PyObject* args) { int ret_name_only = 1; @@ -456,7 +456,7 @@ const char KX_CameraActuator::SetObject_doc[] = "setObject(object)\n" "\t- object: KX_GameObject, string or None\n" "\tSets the object this sensor reacts to.\n"; -PyObject* KX_CameraActuator::PySetObject(PyObject* self, PyObject* value) +PyObject* KX_CameraActuator::PySetObject(PyObject* value) { KX_GameObject *gameobj; @@ -479,9 +479,7 @@ PyObject* KX_CameraActuator::PySetObject(PyObject* self, PyObject* value) const char KX_CameraActuator::GetMin_doc[] = "getMin\n" "\tReturns the minimum value set in the Min: field.\n"; -PyObject* KX_CameraActuator::PyGetMin(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PyGetMin() { ShowDeprecationWarning("getMin()", "the min property"); return PyFloat_FromDouble(m_minHeight); @@ -490,9 +488,7 @@ PyObject* KX_CameraActuator::PyGetMin(PyObject* self, const char KX_CameraActuator::SetMin_doc[] = "setMin\n" "\tSets the minimum value.\n"; -PyObject* KX_CameraActuator::PySetMin(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PySetMin(PyObject* args) { ShowDeprecationWarning("setMin()", "the min property"); float min; @@ -507,9 +503,7 @@ PyObject* KX_CameraActuator::PySetMin(PyObject* self, const char KX_CameraActuator::GetMax_doc[] = "getMax\n" "\tReturns the maximum value set in the Max: field.\n"; -PyObject* KX_CameraActuator::PyGetMax(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PyGetMax() { ShowDeprecationWarning("getMax()", "the max property"); return PyFloat_FromDouble(m_maxHeight); @@ -518,9 +512,7 @@ PyObject* KX_CameraActuator::PyGetMax(PyObject* self, const char KX_CameraActuator::SetMax_doc[] = "setMax\n" "\tSets the maximum value.\n"; -PyObject* KX_CameraActuator::PySetMax(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PySetMax(PyObject* args) { ShowDeprecationWarning("getMax()", "the max property"); float max; @@ -535,9 +527,7 @@ PyObject* KX_CameraActuator::PySetMax(PyObject* self, const char KX_CameraActuator::GetHeight_doc[] = "getHeight\n" "\tReturns the height value set in the height: field.\n"; -PyObject* KX_CameraActuator::PyGetHeight(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PyGetHeight() { ShowDeprecationWarning("getHeight()", "the height property"); return PyFloat_FromDouble(m_height); @@ -546,9 +536,7 @@ PyObject* KX_CameraActuator::PyGetHeight(PyObject* self, const char KX_CameraActuator::SetHeight_doc[] = "setHeight\n" "\tSets the height value.\n"; -PyObject* KX_CameraActuator::PySetHeight(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PySetHeight(PyObject* args) { ShowDeprecationWarning("getHeight()", "the height property"); float height; @@ -564,9 +552,7 @@ const char KX_CameraActuator::SetXY_doc[] = "setXY\n" "\tSets axis the camera tries to get behind.\n" "\t1=x, 0=y\n"; -PyObject* KX_CameraActuator::PySetXY(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PySetXY(PyObject* args) { ShowDeprecationWarning("setXY()", "the xy property"); int value; @@ -583,9 +569,7 @@ const char KX_CameraActuator::GetXY_doc[] = "getXY\n" "\tGets the axis the camera tries to get behind.\n" "\tTrue = X, False = Y\n"; -PyObject* KX_CameraActuator::PyGetXY(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_CameraActuator::PyGetXY() { ShowDeprecationWarning("getXY()", "the xy property"); return PyInt_FromLong(m_x); diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h index d0aceb89aff..9298e1e868d 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.h +++ b/source/gameengine/Ketsji/KX_CameraActuator.h @@ -127,14 +127,14 @@ private : KX_PYMETHOD_DOC_O(KX_CameraActuator,SetObject); /* get current object */ KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,GetObject); - KX_PYMETHOD_DOC(KX_CameraActuator,SetMin); - KX_PYMETHOD_DOC(KX_CameraActuator,GetMin); - KX_PYMETHOD_DOC(KX_CameraActuator,SetMax); - KX_PYMETHOD_DOC(KX_CameraActuator,GetMax); - KX_PYMETHOD_DOC(KX_CameraActuator,SetHeight); - KX_PYMETHOD_DOC(KX_CameraActuator,GetHeight); - KX_PYMETHOD_DOC(KX_CameraActuator,SetXY); - KX_PYMETHOD_DOC(KX_CameraActuator,GetXY); + KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetMin); + KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetMin); + KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetMax); + KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetMax); + KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetHeight); + KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetHeight); + KX_PYMETHOD_DOC_VARARGS(KX_CameraActuator,SetXY); + KX_PYMETHOD_DOC_NOARGS(KX_CameraActuator,GetXY); static PyObject* pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index fc15568ae4f..462abd3a584 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -665,9 +665,7 @@ const char KX_ConstraintActuator::SetDamp_doc[] = "\t- duration: integer\n" "\tSets the time constant of the orientation and distance constraint.\n" "\tIf the duration is negative, it is set to 0.\n"; -PyObject* KX_ConstraintActuator::PySetDamp(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetDamp(PyObject* args) { ShowDeprecationWarning("setDamp()", "the damp property"); int dampArg; if(!PyArg_ParseTuple(args, "i:setDamp", &dampArg)) { @@ -683,7 +681,7 @@ PyObject* KX_ConstraintActuator::PySetDamp(PyObject* self, const char KX_ConstraintActuator::GetDamp_doc[] = "getDamp()\n" "\tReturns the damping parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetDamp(PyObject* self){ +PyObject* KX_ConstraintActuator::PyGetDamp(){ ShowDeprecationWarning("getDamp()", "the damp property"); return PyInt_FromLong(m_posDampTime); } @@ -694,9 +692,7 @@ const char KX_ConstraintActuator::SetRotDamp_doc[] = "\t- duration: integer\n" "\tSets the time constant of the orientation constraint.\n" "\tIf the duration is negative, it is set to 0.\n"; -PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* args) { ShowDeprecationWarning("setRotDamp()", "the rotDamp property"); int dampArg; if(!PyArg_ParseTuple(args, "i:setRotDamp", &dampArg)) { @@ -712,7 +708,7 @@ PyObject* KX_ConstraintActuator::PySetRotDamp(PyObject* self, const char KX_ConstraintActuator::GetRotDamp_doc[] = "getRotDamp()\n" "\tReturns the damping time for application of the constraint.\n"; -PyObject* KX_ConstraintActuator::PyGetRotDamp(PyObject* self){ +PyObject* KX_ConstraintActuator::PyGetRotDamp(){ ShowDeprecationWarning("getRotDamp()", "the rotDamp property"); return PyInt_FromLong(m_rotDampTime); } @@ -722,9 +718,7 @@ const char KX_ConstraintActuator::SetDirection_doc[] = "setDirection(vector)\n" "\t- vector: 3-tuple\n" "\tSets the reference direction in world coordinate for the orientation constraint.\n"; -PyObject* KX_ConstraintActuator::PySetDirection(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetDirection(PyObject* args) { ShowDeprecationWarning("setDirection()", "the direction property"); float x, y, z; MT_Scalar len; @@ -752,7 +746,7 @@ PyObject* KX_ConstraintActuator::PySetDirection(PyObject* self, const 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* KX_ConstraintActuator::PyGetDirection(){ ShowDeprecationWarning("getDirection()", "the direction property"); PyObject *retVal = PyList_New(3); @@ -772,9 +766,7 @@ const char KX_ConstraintActuator::SetOption_doc[] = "\t\t128 : Detect material rather than property\n" "\t\t256 : No deactivation if ray does not hit target\n" "\t\t512 : Activate distance control\n"; -PyObject* KX_ConstraintActuator::PySetOption(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetOption(PyObject* args) { ShowDeprecationWarning("setOption()", "the option property"); int option; if(!PyArg_ParseTuple(args, "i:setOption", &option)) { @@ -789,7 +781,7 @@ PyObject* KX_ConstraintActuator::PySetOption(PyObject* self, const char KX_ConstraintActuator::GetOption_doc[] = "getOption()\n" "\tReturns the option parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetOption(PyObject* self){ +PyObject* KX_ConstraintActuator::PyGetOption(){ ShowDeprecationWarning("getOption()", "the option property"); return PyInt_FromLong(m_option); } @@ -801,9 +793,7 @@ const char KX_ConstraintActuator::SetTime_doc[] = "\tSets the activation time of the actuator.\n" "\tThe actuator disables itself after this many frame.\n" "\tIf set to 0 or negative, the actuator is not limited in time.\n"; -PyObject* KX_ConstraintActuator::PySetTime(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetTime(PyObject* args) { ShowDeprecationWarning("setTime()", "the time property"); int t; if(!PyArg_ParseTuple(args, "i:setTime", &t)) { @@ -820,7 +810,7 @@ PyObject* KX_ConstraintActuator::PySetTime(PyObject* self, const char KX_ConstraintActuator::GetTime_doc[] = "getTime()\n" "\tReturns the time parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetTime(PyObject* self){ +PyObject* KX_ConstraintActuator::PyGetTime(){ ShowDeprecationWarning("getTime()", "the time property"); return PyInt_FromLong(m_activeTime); } @@ -831,9 +821,7 @@ const char KX_ConstraintActuator::SetProperty_doc[] = "\t- property: string\n" "\tSets the name of the property or material for the ray detection of the distance constraint.\n" "\tIf empty, the ray will detect any collisioning object.\n"; -PyObject* KX_ConstraintActuator::PySetProperty(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetProperty(PyObject* args) { ShowDeprecationWarning("setProperty()", "the 'property' property"); char *property; if (!PyArg_ParseTuple(args, "s:setProperty", &property)) { @@ -851,7 +839,7 @@ PyObject* KX_ConstraintActuator::PySetProperty(PyObject* self, const char KX_ConstraintActuator::GetProperty_doc[] = "getProperty()\n" "\tReturns the property parameter.\n"; -PyObject* KX_ConstraintActuator::PyGetProperty(PyObject* self){ +PyObject* KX_ConstraintActuator::PyGetProperty(){ ShowDeprecationWarning("getProperty()", "the 'property' property"); return PyString_FromString(m_property.Ptr()); } @@ -867,9 +855,7 @@ const char KX_ConstraintActuator::SetMin_doc[] = "\t- lower_bound: float\n" "\tSets the lower value of the interval to which the value\n" "\tis clipped.\n"; -PyObject* KX_ConstraintActuator::PySetMin(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetMin(PyObject* args) { ShowDeprecationWarning("setMin() or setDistance()", "the min or distance property"); float minArg; if(!PyArg_ParseTuple(args, "f:setMin", &minArg)) { @@ -898,7 +884,7 @@ const 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* KX_ConstraintActuator::PyGetMin() { ShowDeprecationWarning("getMin() or getDistance()", "the min or distance property"); return PyFloat_FromDouble(m_minimumBound); } @@ -914,9 +900,7 @@ const char KX_ConstraintActuator::SetMax_doc[] = "\t- upper_bound: float\n" "\tSets the upper value of the interval to which the value\n" "\tis clipped.\n"; -PyObject* KX_ConstraintActuator::PySetMax(PyObject* self, - PyObject* args, - PyObject* kwds){ +PyObject* KX_ConstraintActuator::PySetMax(PyObject* args){ ShowDeprecationWarning("setMax() or setRayLength()", "the max or rayLength property"); float maxArg; if(!PyArg_ParseTuple(args, "f:setMax", &maxArg)) { @@ -945,7 +929,7 @@ const 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* KX_ConstraintActuator::PyGetMax() { ShowDeprecationWarning("getMax() or getRayLength()", "the max or rayLength property"); return PyFloat_FromDouble(m_maximumBound); } @@ -969,9 +953,7 @@ const char KX_ConstraintActuator::SetLimit_doc[] = "\t 14 : Align Y axis\n" "\t 15 : Align Z axis\n" "\tSets the type of constraint.\n"; -PyObject* KX_ConstraintActuator::PySetLimit(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ConstraintActuator::PySetLimit(PyObject* args) { ShowDeprecationWarning("setLimit()", "the limit property"); int locrotArg; if(!PyArg_ParseTuple(args, "i:setLimit", &locrotArg)) { @@ -986,7 +968,7 @@ PyObject* KX_ConstraintActuator::PySetLimit(PyObject* self, const char KX_ConstraintActuator::GetLimit_doc[] = "getLimit()\n" "\tReturns the type of constraint.\n"; -PyObject* KX_ConstraintActuator::PyGetLimit(PyObject* self) { +PyObject* KX_ConstraintActuator::PyGetLimit() { ShowDeprecationWarning("setLimit()", "the limit property"); return PyInt_FromLong(m_locrot); } diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index 7ad6e043c49..98f6fcd7906 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -149,27 +149,27 @@ protected: static int pyattr_check_direction(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_check_min(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetDamp); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetDamp); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetDamp); - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetRotDamp); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetRotDamp); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetRotDamp); - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetDirection); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetDirection); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetDirection); - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetOption); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetOption); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetOption); - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetTime); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetTime); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetTime); - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetProperty); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetProperty); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetProperty); - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetMin); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetMin); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetMin); static const char SetDistance_doc[]; static const char GetDistance_doc[]; - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetMax); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetMax); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetMax); static const char SetRayLength_doc[]; static const char GetRayLength_doc[]; - KX_PYMETHOD_DOC(KX_ConstraintActuator,SetLimit); + KX_PYMETHOD_DOC_VARARGS(KX_ConstraintActuator,SetLimit); KX_PYMETHOD_DOC_NOARGS(KX_ConstraintActuator,GetLimit); }; diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp index d5577584616..7c3abb49159 100644 --- a/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.cpp @@ -49,17 +49,12 @@ KX_ConstraintWrapper::~KX_ConstraintWrapper() { } //python integration methods -PyObject* KX_ConstraintWrapper::PyTestMethod(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ConstraintWrapper::PyTestMethod(PyObject* args, PyObject* kwds) { - Py_RETURN_NONE; } -PyObject* KX_ConstraintWrapper::PyGetConstraintId(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ConstraintWrapper::PyGetConstraintId(PyObject* args, PyObject* kwds) { return PyInt_FromLong(m_constraintId); } diff --git a/source/gameengine/Ketsji/KX_GameActuator.cpp b/source/gameengine/Ketsji/KX_GameActuator.cpp index 215c30d65b5..8b587c6f7de 100644 --- a/source/gameengine/Ketsji/KX_GameActuator.cpp +++ b/source/gameengine/Ketsji/KX_GameActuator.cpp @@ -270,7 +270,7 @@ int KX_GameActuator::py_setattro(PyObject *attr, PyObject *value) const char KX_GameActuator::GetFile_doc[] = "getFile()\n" "get the name of the file to start.\n"; -PyObject* KX_GameActuator::PyGetFile(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_GameActuator::PyGetFile(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getFile()", "the file property"); return PyString_FromString(m_filename); @@ -280,7 +280,7 @@ PyObject* KX_GameActuator::PyGetFile(PyObject* self, PyObject* args, PyObject* k const char KX_GameActuator::SetFile_doc[] = "setFile(name)\n" "set the name of the file to start.\n"; -PyObject* KX_GameActuator::PySetFile(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_GameActuator::PySetFile(PyObject* args, PyObject* kwds) { char* new_file; diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 60d2fb0a2f6..9fe7ab75267 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1179,7 +1179,7 @@ bool KX_GameObject::ConvertPythonVectorArgs(PyObject* args, } */ -PyObject* KX_GameObject::PyReplaceMesh(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PyReplaceMesh(PyObject* value) { KX_Scene *scene = KX_GetActiveScene(); char* meshname; @@ -1201,7 +1201,7 @@ PyObject* KX_GameObject::PyReplaceMesh(PyObject* self, PyObject* value) Py_RETURN_NONE; } -PyObject* KX_GameObject::PyEndObject(PyObject* self) +PyObject* KX_GameObject::PyEndObject() { KX_Scene *scene = KX_GetActiveScene(); @@ -1212,7 +1212,7 @@ PyObject* KX_GameObject::PyEndObject(PyObject* self) } -PyObject* KX_GameObject::PyGetPosition(PyObject* self) +PyObject* KX_GameObject::PyGetPosition() { ShowDeprecationWarning("getPosition()", "the position property"); return PyObjectFrom(NodeGetWorldPosition()); @@ -1701,7 +1701,7 @@ PyObject* KX_GameObject::pyattr_get_meshes(void *self_v, const KX_PYATTRIBUTE_DE PyObject *meshes= PyList_New(self->m_meshes.size()); int i; - for(i=0; i < self->m_meshes.size(); i++) + for(i=0; i < (int)self->m_meshes.size(); i++) { KX_MeshProxy* meshproxy = new KX_MeshProxy(self->m_meshes[i]); PyList_SET_ITEM(meshes, i, meshproxy->GetProxy()); @@ -1871,7 +1871,7 @@ int KX_GameObject::py_delattro(PyObject *attr) } -PyObject* KX_GameObject::PyApplyForce(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyApplyForce(PyObject* args) { int local = 0; PyObject* pyvect; @@ -1886,7 +1886,7 @@ PyObject* KX_GameObject::PyApplyForce(PyObject* self, PyObject* args) return NULL; } -PyObject* KX_GameObject::PyApplyTorque(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyApplyTorque(PyObject* args) { int local = 0; PyObject* pyvect; @@ -1901,7 +1901,7 @@ PyObject* KX_GameObject::PyApplyTorque(PyObject* self, PyObject* args) return NULL; } -PyObject* KX_GameObject::PyApplyRotation(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyApplyRotation(PyObject* args) { int local = 0; PyObject* pyvect; @@ -1916,7 +1916,7 @@ PyObject* KX_GameObject::PyApplyRotation(PyObject* self, PyObject* args) return NULL; } -PyObject* KX_GameObject::PyApplyMovement(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyApplyMovement(PyObject* args) { int local = 0; PyObject* pyvect; @@ -1931,7 +1931,7 @@ PyObject* KX_GameObject::PyApplyMovement(PyObject* self, PyObject* args) return NULL; } -PyObject* KX_GameObject::PyGetLinearVelocity(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyGetLinearVelocity(PyObject* args) { // only can get the velocity if we have a physics object connected to us... int local = 0; @@ -1945,7 +1945,7 @@ PyObject* KX_GameObject::PyGetLinearVelocity(PyObject* self, PyObject* args) } } -PyObject* KX_GameObject::PySetLinearVelocity(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PySetLinearVelocity(PyObject* args) { int local = 0; PyObject* pyvect; @@ -1960,7 +1960,7 @@ PyObject* KX_GameObject::PySetLinearVelocity(PyObject* self, PyObject* args) return NULL; } -PyObject* KX_GameObject::PyGetAngularVelocity(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyGetAngularVelocity(PyObject* args) { // only can get the velocity if we have a physics object connected to us... int local = 0; @@ -1974,7 +1974,7 @@ PyObject* KX_GameObject::PyGetAngularVelocity(PyObject* self, PyObject* args) } } -PyObject* KX_GameObject::PySetAngularVelocity(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PySetAngularVelocity(PyObject* args) { int local = 0; PyObject* pyvect; @@ -1989,7 +1989,7 @@ PyObject* KX_GameObject::PySetAngularVelocity(PyObject* self, PyObject* args) return NULL; } -PyObject* KX_GameObject::PySetVisible(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PySetVisible(PyObject* args) { int visible, recursive = 0; if (!PyArg_ParseTuple(args,"i|i:setVisible",&visible, &recursive)) @@ -2001,7 +2001,7 @@ PyObject* KX_GameObject::PySetVisible(PyObject* self, PyObject* args) } -PyObject* KX_GameObject::PySetOcclusion(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PySetOcclusion(PyObject* args) { int occlusion, recursive = 0; if (!PyArg_ParseTuple(args,"i|i:setOcclusion",&occlusion, &recursive)) @@ -2011,13 +2011,13 @@ PyObject* KX_GameObject::PySetOcclusion(PyObject* self, PyObject* args) Py_RETURN_NONE; } -PyObject* KX_GameObject::PyGetVisible(PyObject* self) +PyObject* KX_GameObject::PyGetVisible() { ShowDeprecationWarning("getVisible()", "the visible property"); return PyInt_FromLong(m_bVisible); } -PyObject* KX_GameObject::PyGetState(PyObject* self) +PyObject* KX_GameObject::PyGetState() { ShowDeprecationWarning("getState()", "the state property"); int state = 0; @@ -2025,7 +2025,7 @@ PyObject* KX_GameObject::PyGetState(PyObject* self) return PyInt_FromLong(state); } -PyObject* KX_GameObject::PySetState(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PySetState(PyObject* value) { ShowDeprecationWarning("setState()", "the state property"); int state_i = PyInt_AsLong(value); @@ -2046,7 +2046,7 @@ PyObject* KX_GameObject::PySetState(PyObject* self, PyObject* value) Py_RETURN_NONE; } -PyObject* KX_GameObject::PyGetVelocity(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyGetVelocity(PyObject* args) { // only can get the velocity if we have a physics object connected to us... MT_Point3 point(0.0,0.0,0.0); @@ -2072,13 +2072,13 @@ PyObject* KX_GameObject::PyGetVelocity(PyObject* self, PyObject* args) -PyObject* KX_GameObject::PyGetMass(PyObject* self) +PyObject* KX_GameObject::PyGetMass() { ShowDeprecationWarning("getMass()", "the mass property"); return PyFloat_FromDouble((GetPhysicsController() != NULL) ? GetPhysicsController()->GetMass() : 0.0f); } -PyObject* KX_GameObject::PyGetReactionForce(PyObject* self) +PyObject* KX_GameObject::PyGetReactionForce() { // only can get the velocity if we have a physics object connected to us... @@ -2095,7 +2095,7 @@ PyObject* KX_GameObject::PyGetReactionForce(PyObject* self) -PyObject* KX_GameObject::PyEnableRigidBody(PyObject* self) +PyObject* KX_GameObject::PyEnableRigidBody() { if(GetPhysicsController()) GetPhysicsController()->setRigidBody(true); @@ -2105,7 +2105,7 @@ PyObject* KX_GameObject::PyEnableRigidBody(PyObject* self) -PyObject* KX_GameObject::PyDisableRigidBody(PyObject* self) +PyObject* KX_GameObject::PyDisableRigidBody() { if(GetPhysicsController()) GetPhysicsController()->setRigidBody(false); @@ -2115,7 +2115,7 @@ PyObject* KX_GameObject::PyDisableRigidBody(PyObject* self) -PyObject* KX_GameObject::PyGetParent(PyObject* self) +PyObject* KX_GameObject::PyGetParent() { ShowDeprecationWarning("getParent()", "the parent property"); KX_GameObject* parent = this->GetParent(); @@ -2124,7 +2124,7 @@ PyObject* KX_GameObject::PyGetParent(PyObject* self) Py_RETURN_NONE; } -PyObject* KX_GameObject::PySetParent(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PySetParent(PyObject* value) { KX_GameObject *obj; if (!ConvertPythonToGameObject(value, &obj, false)) @@ -2134,24 +2134,24 @@ PyObject* KX_GameObject::PySetParent(PyObject* self, PyObject* value) Py_RETURN_NONE; } -PyObject* KX_GameObject::PyRemoveParent(PyObject* self) +PyObject* KX_GameObject::PyRemoveParent() { KX_Scene *scene = KX_GetActiveScene(); this->RemoveParent(scene); Py_RETURN_NONE; } -PyObject* KX_GameObject::PyGetChildren(PyObject* self) +PyObject* KX_GameObject::PyGetChildren() { return GetChildren()->NewProxy(true); } -PyObject* KX_GameObject::PyGetChildrenRecursive(PyObject* self) +PyObject* KX_GameObject::PyGetChildrenRecursive() { return GetChildrenRecursive()->NewProxy(true); } -PyObject* KX_GameObject::PyGetMesh(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyGetMesh(PyObject* args) { ShowDeprecationWarning("getMesh()", "the meshes property"); @@ -2173,7 +2173,7 @@ PyObject* KX_GameObject::PyGetMesh(PyObject* self, PyObject* args) -PyObject* KX_GameObject::PySetCollisionMargin(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PySetCollisionMargin(PyObject* value) { float collisionMargin = PyFloat_AsDouble(value); @@ -2193,7 +2193,7 @@ PyObject* KX_GameObject::PySetCollisionMargin(PyObject* self, PyObject* value) -PyObject* KX_GameObject::PyApplyImpulse(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyApplyImpulse(PyObject* args) { PyObject* pyattach; PyObject* pyimpulse; @@ -2220,7 +2220,7 @@ PyObject* KX_GameObject::PyApplyImpulse(PyObject* self, PyObject* args) -PyObject* KX_GameObject::PySuspendDynamics(PyObject* self) +PyObject* KX_GameObject::PySuspendDynamics() { SuspendDynamics(); Py_RETURN_NONE; @@ -2228,7 +2228,7 @@ PyObject* KX_GameObject::PySuspendDynamics(PyObject* self) -PyObject* KX_GameObject::PyRestoreDynamics(PyObject* self) +PyObject* KX_GameObject::PyRestoreDynamics() { RestoreDynamics(); Py_RETURN_NONE; @@ -2236,7 +2236,7 @@ PyObject* KX_GameObject::PyRestoreDynamics(PyObject* self) -PyObject* KX_GameObject::PyGetOrientation(PyObject* self) //keywords +PyObject* KX_GameObject::PyGetOrientation() //keywords { ShowDeprecationWarning("getOrientation()", "the orientation property"); return PyObjectFrom(NodeGetWorldOrientation()); @@ -2244,7 +2244,7 @@ PyObject* KX_GameObject::PyGetOrientation(PyObject* self) //keywords -PyObject* KX_GameObject::PySetOrientation(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PySetOrientation(PyObject* value) { ShowDeprecationWarning("setOrientation()", "the orientation property"); MT_Matrix3x3 matrix; @@ -2266,7 +2266,7 @@ PyObject* KX_GameObject::PySetOrientation(PyObject* self, PyObject* value) return NULL; } -PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* self, PyObject* args) +PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* args) { PyObject* pyvect; int axis = 2; //z axis is the default @@ -2288,7 +2288,7 @@ PyObject* KX_GameObject::PyAlignAxisToVect(PyObject* self, PyObject* args) return NULL; } -PyObject* KX_GameObject::PyGetAxisVect(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PyGetAxisVect(PyObject* value) { MT_Vector3 vect; if (PyVecTo(value, vect)) @@ -2298,7 +2298,7 @@ PyObject* KX_GameObject::PyGetAxisVect(PyObject* self, PyObject* value) return NULL; } -PyObject* KX_GameObject::PySetPosition(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PySetPosition(PyObject* value) { ShowDeprecationWarning("setPosition()", "the position property"); MT_Point3 pos; @@ -2312,7 +2312,7 @@ PyObject* KX_GameObject::PySetPosition(PyObject* self, PyObject* value) return NULL; } -PyObject* KX_GameObject::PySetWorldPosition(PyObject* self, PyObject* value) +PyObject* KX_GameObject::PySetWorldPosition(PyObject* value) { MT_Point3 pos; if (PyVecTo(value, pos)) @@ -2325,7 +2325,7 @@ PyObject* KX_GameObject::PySetWorldPosition(PyObject* self, PyObject* value) return NULL; } -PyObject* KX_GameObject::PyGetPhysicsId(PyObject* self) +PyObject* KX_GameObject::PyGetPhysicsId() { KX_IPhysicsController* ctrl = GetPhysicsController(); uint_ptr physid=0; @@ -2336,7 +2336,7 @@ PyObject* KX_GameObject::PyGetPhysicsId(PyObject* self) return PyInt_FromLong((long)physid); } -PyObject* KX_GameObject::PyGetPropertyNames(PyObject* self) +PyObject* KX_GameObject::PyGetPropertyNames() { PyObject *list= ConvertKeysToPython(); diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index 558b77c1f77..f04e3c79a8e 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -490,9 +490,7 @@ const char KX_IpoActuator::Set_doc[] = "\t - endframe : last frame to use (int)\n" "\t - mode? : special mode (0=normal, 1=interpret location as force, 2=additive)" "\tSet the properties of the actuator.\n"; -PyObject* KX_IpoActuator::PySet(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySet(PyObject* args) { ShowDeprecationWarning("set()", "a number properties"); @@ -533,9 +531,7 @@ const char KX_IpoActuator::SetProperty_doc[] = "setProperty(propname)\n" "\t - propname: name of the property (string)\n" "\tSet the property to be used in FromProp mode.\n"; -PyObject* KX_IpoActuator::PySetProperty(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySetProperty(PyObject* args) { ShowDeprecationWarning("setProperty()", "the propName property"); @@ -556,9 +552,7 @@ const char KX_IpoActuator::SetStart_doc[] = "setStart(frame)\n" "\t - frame: first frame to use (int)\n" "\tSet the frame from which the ipo starts playing.\n"; -PyObject* KX_IpoActuator::PySetStart(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySetStart(PyObject* args) { ShowDeprecationWarning("setStart()", "the startFrame property"); @@ -575,7 +569,7 @@ PyObject* KX_IpoActuator::PySetStart(PyObject* self, const char KX_IpoActuator::GetStart_doc[] = "getStart()\n" "\tReturns the frame from which the ipo starts playing.\n"; -PyObject* KX_IpoActuator::PyGetStart(PyObject* self) { +PyObject* KX_IpoActuator::PyGetStart() { ShowDeprecationWarning("getStart()", "the startFrame property"); return PyFloat_FromDouble(m_startframe); } @@ -585,9 +579,7 @@ const char KX_IpoActuator::SetEnd_doc[] = "setEnd(frame)\n" "\t - frame: last frame to use (int)\n" "\tSet the frame at which the ipo stops playing.\n"; -PyObject* KX_IpoActuator::PySetEnd(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySetEnd(PyObject* args) { ShowDeprecationWarning("setEnd()", "the endFrame property"); float endArg; if(!PyArg_ParseTuple(args, "f:setEnd", &endArg)) { @@ -602,7 +594,7 @@ PyObject* KX_IpoActuator::PySetEnd(PyObject* self, const char KX_IpoActuator::GetEnd_doc[] = "getEnd()\n" "\tReturns the frame at which the ipo stops playing.\n"; -PyObject* KX_IpoActuator::PyGetEnd(PyObject* self) { +PyObject* KX_IpoActuator::PyGetEnd() { ShowDeprecationWarning("getEnd()", "the endFrame property"); return PyFloat_FromDouble(m_endframe); } @@ -612,9 +604,7 @@ const char KX_IpoActuator::SetIpoAsForce_doc[] = "setIpoAsForce(force?)\n" "\t - force? : interpret this ipo as a force? (KX_TRUE, KX_FALSE)\n" "\tSet whether to interpret the ipo as a force rather than a displacement.\n"; -PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* args) { ShowDeprecationWarning("setIpoAsForce()", "the useIpoAsForce property"); int boolArg; @@ -632,7 +622,7 @@ PyObject* KX_IpoActuator::PySetIpoAsForce(PyObject* self, const 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* KX_IpoActuator::PyGetIpoAsForce() { ShowDeprecationWarning("getIpoAsForce()", "the useIpoAsForce property"); return BoolToPyArg(m_ipo_as_force); } @@ -642,9 +632,7 @@ const char KX_IpoActuator::SetIpoAdd_doc[] = "setIpoAdd(add?)\n" "\t - add? : add flag (KX_TRUE, KX_FALSE)\n" "\tSet whether to interpret the ipo as additive rather than absolute.\n"; -PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* args) { ShowDeprecationWarning("setIpoAdd()", "the useIpoAdd property"); int boolArg; @@ -662,7 +650,7 @@ PyObject* KX_IpoActuator::PySetIpoAdd(PyObject* self, const 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* KX_IpoActuator::PyGetIpoAdd() { ShowDeprecationWarning("getIpoAdd()", "the useIpoAdd property"); return BoolToPyArg(m_ipo_add); } @@ -672,9 +660,7 @@ const char KX_IpoActuator::SetType_doc[] = "setType(mode)\n" "\t - mode: Play, PingPong, Flipper, LoopStop, LoopEnd or FromProp (string)\n" "\tSet the operation mode of the actuator.\n"; -PyObject* KX_IpoActuator::PySetType(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySetType(PyObject* args) { ShowDeprecationWarning("setType()", "the type property"); int typeArg; @@ -693,7 +679,7 @@ PyObject* KX_IpoActuator::PySetType(PyObject* self, const char KX_IpoActuator::GetType_doc[] = "getType()\n" "\tReturns the operation mode of the actuator.\n"; -PyObject* KX_IpoActuator::PyGetType(PyObject* self) { +PyObject* KX_IpoActuator::PyGetType() { ShowDeprecationWarning("getType()", "the type property"); return PyInt_FromLong(m_type); } @@ -705,9 +691,7 @@ const char KX_IpoActuator::SetForceIpoActsLocal_doc[] = "\t coordinates? (KX_TRUE, KX_FALSE)\n" "\tSet whether to apply the force in the object's local\n" "\tcoordinates rather than the world global coordinates.\n"; -PyObject* KX_IpoActuator::PySetForceIpoActsLocal(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_IpoActuator::PySetForceIpoActsLocal(PyObject* args) { ShowDeprecationWarning("setForceIpoActsLocal()", "the useIpoLocal property"); int boolArg; @@ -724,7 +708,7 @@ const 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* KX_IpoActuator::PyGetForceIpoActsLocal() { ShowDeprecationWarning("getForceIpoActsLocal()", "the useIpoLocal property"); return BoolToPyArg(m_ipo_local); } diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index 7e85a28eb96..184ad5512de 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -145,20 +145,20 @@ public: virtual int py_setattro(PyObject *attr, PyObject *value); //KX_PYMETHOD_DOC - KX_PYMETHOD_DOC(KX_IpoActuator,Set); - KX_PYMETHOD_DOC(KX_IpoActuator,SetProperty); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,Set); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetProperty); /* KX_PYMETHOD_DOC(KX_IpoActuator,SetKey2Key); */ - KX_PYMETHOD_DOC(KX_IpoActuator,SetStart); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetStart); KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetStart); - KX_PYMETHOD_DOC(KX_IpoActuator,SetEnd); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetEnd); KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetEnd); - KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAsForce); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetIpoAsForce); KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetIpoAsForce); - KX_PYMETHOD_DOC(KX_IpoActuator,SetIpoAdd); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetIpoAdd); KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetIpoAdd); - KX_PYMETHOD_DOC(KX_IpoActuator,SetType); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetType); KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetType); - KX_PYMETHOD_DOC(KX_IpoActuator,SetForceIpoActsLocal); + KX_PYMETHOD_DOC_VARARGS(KX_IpoActuator,SetForceIpoActsLocal); KX_PYMETHOD_DOC_NOARGS(KX_IpoActuator,GetForceIpoActsLocal); }; diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 8ce5e888349..ded862fb21d 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -139,25 +139,21 @@ void KX_MeshProxy::ReplicaSetName(STR_String name) {}; // stuff for python integration -PyObject* KX_MeshProxy::PyGetNumMaterials(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_MeshProxy::PyGetNumMaterials(PyObject* args, PyObject* kwds) { int num = m_meshobj->NumMaterials(); ShowDeprecationWarning("getNumMaterials()", "the numMaterials property"); return PyInt_FromLong(num); } -PyObject* KX_MeshProxy::PyGetNumPolygons(PyObject* self) +PyObject* KX_MeshProxy::PyGetNumPolygons() { int num = m_meshobj->NumPolygons(); ShowDeprecationWarning("getNumPolygons()", "the numPolygons property"); return PyInt_FromLong(num); } -PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* args, PyObject* kwds) { int matid= 1; STR_String matname; @@ -175,9 +171,7 @@ PyObject* KX_MeshProxy::PyGetMaterialName(PyObject* self, } -PyObject* KX_MeshProxy::PyGetTextureName(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_MeshProxy::PyGetTextureName(PyObject* args, PyObject* kwds) { int matid= 1; STR_String matname; @@ -194,9 +188,7 @@ PyObject* KX_MeshProxy::PyGetTextureName(PyObject* self, } -PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* args, PyObject* kwds) { int matid= 0; int length = 0; @@ -219,9 +211,7 @@ PyObject* KX_MeshProxy::PyGetVertexArrayLength(PyObject* self, } -PyObject* KX_MeshProxy::PyGetVertex(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_MeshProxy::PyGetVertex(PyObject* args, PyObject* kwds) { int vertexindex= 1; int matindex= 1; @@ -243,9 +233,7 @@ PyObject* KX_MeshProxy::PyGetVertex(PyObject* self, } -PyObject* KX_MeshProxy::PyGetPolygon(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_MeshProxy::PyGetPolygon(PyObject* args, PyObject* kwds) { int polyindex= 1; PyObject* polyob = NULL; diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp index b59f18bf935..87b5c81392d 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp @@ -391,7 +391,7 @@ PyObject* KX_MouseFocusSensor::py_getattro(PyObject *attr) { const char KX_MouseFocusSensor::GetHitObject_doc[] = "getHitObject()\n" "\tReturns the object that was hit by this ray.\n"; -PyObject* KX_MouseFocusSensor::PyGetHitObject(PyObject* self) +PyObject* KX_MouseFocusSensor::PyGetHitObject() { ShowDeprecationWarning("GetHitObject()", "the hitObject property"); @@ -405,7 +405,7 @@ PyObject* KX_MouseFocusSensor::PyGetHitObject(PyObject* self) const char KX_MouseFocusSensor::GetHitPosition_doc[] = "getHitPosition()\n" "\tReturns the position (in worldcoordinates) where the object was hit by this ray.\n"; -PyObject* KX_MouseFocusSensor::PyGetHitPosition(PyObject* self) +PyObject* KX_MouseFocusSensor::PyGetHitPosition() { ShowDeprecationWarning("getHitPosition()", "the hitPosition property"); @@ -415,7 +415,7 @@ PyObject* KX_MouseFocusSensor::PyGetHitPosition(PyObject* self) const char KX_MouseFocusSensor::GetRayDirection_doc[] = "getRayDirection()\n" "\tReturns the direction from the ray (in worldcoordinates) .\n"; -PyObject* KX_MouseFocusSensor::PyGetRayDirection(PyObject* self) +PyObject* KX_MouseFocusSensor::PyGetRayDirection() { ShowDeprecationWarning("getRayDirection()", "the rayDirection property"); @@ -428,7 +428,7 @@ PyObject* KX_MouseFocusSensor::PyGetRayDirection(PyObject* self) const char KX_MouseFocusSensor::GetHitNormal_doc[] = "getHitNormal()\n" "\tReturns the normal (in worldcoordinates) at the point of collision where the object was hit by this ray.\n"; -PyObject* KX_MouseFocusSensor::PyGetHitNormal(PyObject* self) +PyObject* KX_MouseFocusSensor::PyGetHitNormal() { ShowDeprecationWarning("getHitNormal()", "the hitNormal property"); @@ -441,7 +441,7 @@ const char KX_MouseFocusSensor::GetRayTarget_doc[] = "getRayTarget()\n" "\tReturns the target of the ray that seeks the focus object,\n" "\tin worldcoordinates."; -PyObject* KX_MouseFocusSensor::PyGetRayTarget(PyObject* self) +PyObject* KX_MouseFocusSensor::PyGetRayTarget() { ShowDeprecationWarning("getRayTarget()", "the rayTarget property"); @@ -453,7 +453,7 @@ const char KX_MouseFocusSensor::GetRaySource_doc[] = "getRaySource()\n" "\tReturns the source of the ray that seeks the focus object,\n" "\tin worldcoordinates."; -PyObject* KX_MouseFocusSensor::PyGetRaySource(PyObject* self) +PyObject* KX_MouseFocusSensor::PyGetRaySource() { ShowDeprecationWarning("getRaySource()", "the raySource property"); diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 4f1890772d7..861c5757971 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -344,7 +344,7 @@ PyObject* KX_ObjectActuator::py_getattro(PyObject *attr) { /* Removed! */ /* 2. getForce */ -PyObject* KX_ObjectActuator::PyGetForce(PyObject* self) +PyObject* KX_ObjectActuator::PyGetForce() { PyObject *retVal = PyList_New(4); @@ -356,9 +356,7 @@ PyObject* KX_ObjectActuator::PyGetForce(PyObject* self) return retVal; } /* 3. setForce */ -PyObject* KX_ObjectActuator::PySetForce(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetForce(PyObject* args) { float vecArg[3]; int bToggle = 0; @@ -373,7 +371,7 @@ PyObject* KX_ObjectActuator::PySetForce(PyObject* self, } /* 4. getTorque */ -PyObject* KX_ObjectActuator::PyGetTorque(PyObject* self) +PyObject* KX_ObjectActuator::PyGetTorque() { PyObject *retVal = PyList_New(4); @@ -385,9 +383,7 @@ PyObject* KX_ObjectActuator::PyGetTorque(PyObject* self) return retVal; } /* 5. setTorque */ -PyObject* KX_ObjectActuator::PySetTorque(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetTorque(PyObject* args) { float vecArg[3]; int bToggle = 0; @@ -402,7 +398,7 @@ PyObject* KX_ObjectActuator::PySetTorque(PyObject* self, } /* 6. getDLoc */ -PyObject* KX_ObjectActuator::PyGetDLoc(PyObject* self) +PyObject* KX_ObjectActuator::PyGetDLoc() { PyObject *retVal = PyList_New(4); @@ -414,9 +410,7 @@ PyObject* KX_ObjectActuator::PyGetDLoc(PyObject* self) return retVal; } /* 7. setDLoc */ -PyObject* KX_ObjectActuator::PySetDLoc(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetDLoc(PyObject* args) { float vecArg[3]; int bToggle = 0; @@ -431,7 +425,7 @@ PyObject* KX_ObjectActuator::PySetDLoc(PyObject* self, } /* 8. getDRot */ -PyObject* KX_ObjectActuator::PyGetDRot(PyObject* self) +PyObject* KX_ObjectActuator::PyGetDRot() { PyObject *retVal = PyList_New(4); @@ -443,9 +437,7 @@ PyObject* KX_ObjectActuator::PyGetDRot(PyObject* self) return retVal; } /* 9. setDRot */ -PyObject* KX_ObjectActuator::PySetDRot(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetDRot(PyObject* args) { float vecArg[3]; int bToggle = 0; @@ -460,7 +452,7 @@ PyObject* KX_ObjectActuator::PySetDRot(PyObject* self, } /* 10. getLinearVelocity */ -PyObject* KX_ObjectActuator::PyGetLinearVelocity(PyObject* self) { +PyObject* KX_ObjectActuator::PyGetLinearVelocity() { PyObject *retVal = PyList_New(4); PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_linear_velocity[0])); @@ -472,9 +464,7 @@ PyObject* KX_ObjectActuator::PyGetLinearVelocity(PyObject* self) { } /* 11. setLinearVelocity */ -PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* args) { float vecArg[3]; int bToggle = 0; if (!PyArg_ParseTuple(args, "fffi:setLinearVelocity", &vecArg[0], &vecArg[1], @@ -489,7 +479,7 @@ PyObject* KX_ObjectActuator::PySetLinearVelocity(PyObject* self, /* 12. getAngularVelocity */ -PyObject* KX_ObjectActuator::PyGetAngularVelocity(PyObject* self) { +PyObject* KX_ObjectActuator::PyGetAngularVelocity() { PyObject *retVal = PyList_New(4); PyList_SetItem(retVal, 0, PyFloat_FromDouble(m_angular_velocity[0])); @@ -500,9 +490,7 @@ PyObject* KX_ObjectActuator::PyGetAngularVelocity(PyObject* self) { return retVal; } /* 13. setAngularVelocity */ -PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* args) { float vecArg[3]; int bToggle = 0; if (!PyArg_ParseTuple(args, "fffi:setAngularVelocity", &vecArg[0], &vecArg[1], @@ -516,9 +504,7 @@ PyObject* KX_ObjectActuator::PySetAngularVelocity(PyObject* self, } /* 13. setDamping */ -PyObject* KX_ObjectActuator::PySetDamping(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* KX_ObjectActuator::PySetDamping(PyObject* args) { int damping = 0; if (!PyArg_ParseTuple(args, "i:setDamping", &damping) || damping < 0 || damping > 1000) { return NULL; @@ -528,11 +514,11 @@ PyObject* KX_ObjectActuator::PySetDamping(PyObject* self, } /* 13. getVelocityDamping */ -PyObject* KX_ObjectActuator::PyGetDamping(PyObject* self) { +PyObject* KX_ObjectActuator::PyGetDamping() { return Py_BuildValue("i",m_damping); } /* 6. getForceLimitX */ -PyObject* KX_ObjectActuator::PyGetForceLimitX(PyObject* self) +PyObject* KX_ObjectActuator::PyGetForceLimitX() { PyObject *retVal = PyList_New(3); @@ -543,9 +529,7 @@ PyObject* KX_ObjectActuator::PyGetForceLimitX(PyObject* self) return retVal; } /* 7. setForceLimitX */ -PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* args) { float vecArg[2]; int bToggle = 0; @@ -559,7 +543,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitX(PyObject* self, } /* 6. getForceLimitY */ -PyObject* KX_ObjectActuator::PyGetForceLimitY(PyObject* self) +PyObject* KX_ObjectActuator::PyGetForceLimitY() { PyObject *retVal = PyList_New(3); @@ -570,9 +554,7 @@ PyObject* KX_ObjectActuator::PyGetForceLimitY(PyObject* self) return retVal; } /* 7. setForceLimitY */ -PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* args) { float vecArg[2]; int bToggle = 0; @@ -586,7 +568,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitY(PyObject* self, } /* 6. getForceLimitZ */ -PyObject* KX_ObjectActuator::PyGetForceLimitZ(PyObject* self) +PyObject* KX_ObjectActuator::PyGetForceLimitZ() { PyObject *retVal = PyList_New(3); @@ -597,9 +579,7 @@ PyObject* KX_ObjectActuator::PyGetForceLimitZ(PyObject* self) return retVal; } /* 7. setForceLimitZ */ -PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* args) { float vecArg[2]; int bToggle = 0; @@ -613,7 +593,7 @@ PyObject* KX_ObjectActuator::PySetForceLimitZ(PyObject* self, } /* 4. getPID */ -PyObject* KX_ObjectActuator::PyGetPID(PyObject* self) +PyObject* KX_ObjectActuator::PyGetPID() { PyObject *retVal = PyList_New(3); @@ -624,9 +604,7 @@ PyObject* KX_ObjectActuator::PyGetPID(PyObject* self) return retVal; } /* 5. setPID */ -PyObject* KX_ObjectActuator::PySetPID(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_ObjectActuator::PySetPID(PyObject* args) { float vecArg[3]; if (!PyArg_ParseTuple(args, "fff:setPID", &vecArg[0], &vecArg[1], &vecArg[2])) { diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index 00c8fb700ae..a812942a0ae 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -156,27 +156,27 @@ public: virtual PyObject* py_getattro(PyObject *attr); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForce); - KX_PYMETHOD(KX_ObjectActuator,SetForce); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForce); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetTorque); - KX_PYMETHOD(KX_ObjectActuator,SetTorque); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetTorque); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDLoc); - KX_PYMETHOD(KX_ObjectActuator,SetDLoc); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetDLoc); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDRot); - KX_PYMETHOD(KX_ObjectActuator,SetDRot); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetDRot); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetLinearVelocity); - KX_PYMETHOD(KX_ObjectActuator,SetLinearVelocity); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetLinearVelocity); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetAngularVelocity); - KX_PYMETHOD(KX_ObjectActuator,SetAngularVelocity); - KX_PYMETHOD(KX_ObjectActuator,SetDamping); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetAngularVelocity); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetDamping); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetDamping); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitX); - KX_PYMETHOD(KX_ObjectActuator,SetForceLimitX); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForceLimitX); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitY); - KX_PYMETHOD(KX_ObjectActuator,SetForceLimitY); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForceLimitY); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetForceLimitZ); - KX_PYMETHOD(KX_ObjectActuator,SetForceLimitZ); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetForceLimitZ); KX_PYMETHOD_NOARGS(KX_ObjectActuator,GetPID); - KX_PYMETHOD(KX_ObjectActuator,SetPID); + KX_PYMETHOD_VARARGS(KX_ObjectActuator,SetPID); }; #endif //__KX_OBJECTACTUATOR diff --git a/source/gameengine/Ketsji/KX_ParentActuator.cpp b/source/gameengine/Ketsji/KX_ParentActuator.cpp index 5263dd72065..69c0a3cd510 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.cpp +++ b/source/gameengine/Ketsji/KX_ParentActuator.cpp @@ -221,7 +221,7 @@ const char KX_ParentActuator::SetObject_doc[] = "setObject(object)\n" "\t- object: KX_GameObject, string or None\n" "\tSet the object to set as parent.\n"; -PyObject* KX_ParentActuator::PySetObject(PyObject* self, PyObject* value) { +PyObject* KX_ParentActuator::PySetObject(PyObject* value) { KX_GameObject *gameobj; ShowDeprecationWarning("setObject()", "the object property"); @@ -246,7 +246,7 @@ const char KX_ParentActuator::GetObject_doc[] = "getObject(name_only = 1)\n" "name_only - optional arg, when true will return the KX_GameObject rather then its name\n" "\tReturns the object that is set to.\n"; -PyObject* KX_ParentActuator::PyGetObject(PyObject* self, PyObject* args) +PyObject* KX_ParentActuator::PyGetObject(PyObject* args) { int ret_name_only = 1; diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp index f000d079927..fda639c09e0 100644 --- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp +++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp @@ -51,9 +51,7 @@ KX_PhysicsObjectWrapper::~KX_PhysicsObjectWrapper() } -PyObject* KX_PhysicsObjectWrapper::PySetPosition(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_PhysicsObjectWrapper::PySetPosition(PyObject* args) { float x,y,z; if (PyArg_ParseTuple(args,"fff:setPosition",&x,&y,&z)) @@ -67,9 +65,7 @@ PyObject* KX_PhysicsObjectWrapper::PySetPosition(PyObject* self, } -PyObject* KX_PhysicsObjectWrapper::PySetLinearVelocity(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_PhysicsObjectWrapper::PySetLinearVelocity(PyObject* args) { float x,y,z; int local; @@ -83,9 +79,7 @@ PyObject* KX_PhysicsObjectWrapper::PySetLinearVelocity(PyObject* self, Py_RETURN_NONE; } -PyObject* KX_PhysicsObjectWrapper::PySetAngularVelocity(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_PhysicsObjectWrapper::PySetAngularVelocity(PyObject* args) { float x,y,z; int local; @@ -99,9 +93,7 @@ PyObject* KX_PhysicsObjectWrapper::PySetAngularVelocity(PyObject* self, Py_RETURN_NONE; } -PyObject* KX_PhysicsObjectWrapper::PySetActive(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_PhysicsObjectWrapper::PySetActive(PyObject* args) { int active; if (PyArg_ParseTuple(args,"i:setActive",&active)) diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h index 6dc10f030f0..7e10dc3ccf4 100644 --- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h +++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h @@ -42,10 +42,10 @@ public: KX_PhysicsObjectWrapper(class PHY_IPhysicsController* ctrl,class PHY_IPhysicsEnvironment* physenv,PyTypeObject *T = &Type); virtual ~KX_PhysicsObjectWrapper(); - KX_PYMETHOD(KX_PhysicsObjectWrapper , SetPosition); - KX_PYMETHOD(KX_PhysicsObjectWrapper,SetLinearVelocity); - KX_PYMETHOD(KX_PhysicsObjectWrapper,SetAngularVelocity); - KX_PYMETHOD(KX_PhysicsObjectWrapper,SetActive); + KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetPosition); + KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetLinearVelocity); + KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetAngularVelocity); + KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetActive); private: class PHY_IPhysicsController* m_ctrl; diff --git a/source/gameengine/Ketsji/KX_PolyProxy.cpp b/source/gameengine/Ketsji/KX_PolyProxy.cpp index e227ba09fba..5888579431a 100644 --- a/source/gameengine/Ketsji/KX_PolyProxy.cpp +++ b/source/gameengine/Ketsji/KX_PolyProxy.cpp @@ -123,7 +123,7 @@ PyObject* KX_PolyProxy::py_getattro(PyObject *attr) // the one of the polygon RAS_MaterialBucket* polyBucket = m_polygon->GetMaterial(); unsigned int matid; - for (matid=0; matid<m_mesh->NumMaterials(); matid++) + for (matid=0; matid<(unsigned int)m_mesh->NumMaterials(); matid++) { RAS_MeshMaterial* meshMat = m_mesh->GetMeshMaterial(matid); if (meshMat->m_bucket == polyBucket) @@ -189,7 +189,7 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_PolyProxy, getMaterialIndex, { RAS_MaterialBucket* polyBucket = m_polygon->GetMaterial(); unsigned int matid; - for (matid=0; matid<m_mesh->NumMaterials(); matid++) + for (matid=0; matid<(unsigned int)m_mesh->NumMaterials(); matid++) { RAS_MeshMaterial* meshMat = m_mesh->GetMeshMaterial(matid); if (meshMat->m_bucket == polyBucket) diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp index 1c3bb250b03..2227072d2e7 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.cpp +++ b/source/gameengine/Ketsji/KX_PythonInit.cpp @@ -183,9 +183,9 @@ from = Name of object to sned the string from"; static PyObject* gPySendMessage(PyObject*, PyObject* args) { char* subject; - char* body = ""; - char* to = ""; - char* from = ""; + char* body = (char *)""; + char* to = (char *)""; + char* from = (char *)""; if (!PyArg_ParseTuple(args, "s|sss:sendMessage", &subject, &body, &to, &from)) return NULL; @@ -1422,7 +1422,7 @@ static void clearGameModules() /* Note, user modules could still reference these modules * but since the dict's are cleared their members wont be accessible */ - PyObject *modules= PySys_GetObject("modules"); + PyObject *modules= PySys_GetObject((char *)"modules"); clearModule(modules, "Expression"); clearModule(modules, "CValue"); clearModule(modules, "PhysicsConstraints"); diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp index 2bf60dbc102..dcd11b551a1 100644 --- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp +++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp @@ -160,7 +160,7 @@ void initPyTypes(void) /* For now just do PyType_Ready */ PyObject *mod= PyModule_New("GameTypes"); PyObject *dict= PyModule_GetDict(mod); - PyDict_SetItemString(PySys_GetObject("modules"), "GameTypes", mod); + PyDict_SetItemString(PySys_GetObject((char *)"modules"), (char *)"GameTypes", mod); Py_DECREF(mod); PyType_Ready_Attr(dict, BL_ActionActuator); diff --git a/source/gameengine/Ketsji/KX_RadarSensor.cpp b/source/gameengine/Ketsji/KX_RadarSensor.cpp index 40af3b22aeb..8277e7ef19c 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.cpp +++ b/source/gameengine/Ketsji/KX_RadarSensor.cpp @@ -207,7 +207,7 @@ const char KX_RadarSensor::GetConeOrigin_doc[] = "getConeOrigin()\n" "\tReturns the origin of the cone with which to test. The origin\n" "\tis in the middle of the cone."; -PyObject* KX_RadarSensor::PyGetConeOrigin(PyObject* self) { +PyObject* KX_RadarSensor::PyGetConeOrigin() { ShowDeprecationWarning("getConeOrigin()", "the coneOrigin property"); PyObject *retVal = PyList_New(3); @@ -223,7 +223,7 @@ PyObject* KX_RadarSensor::PyGetConeOrigin(PyObject* self) { const char KX_RadarSensor::GetConeTarget_doc[] = "getConeTarget()\n" "\tReturns the center of the bottom face of the cone with which to test.\n"; -PyObject* KX_RadarSensor::PyGetConeTarget(PyObject* self) { +PyObject* KX_RadarSensor::PyGetConeTarget() { ShowDeprecationWarning("getConeTarget()", "the coneTarget property"); PyObject *retVal = PyList_New(3); @@ -239,7 +239,7 @@ PyObject* KX_RadarSensor::PyGetConeTarget(PyObject* self) { const char KX_RadarSensor::GetConeHeight_doc[] = "getConeHeight()\n" "\tReturns the height of the cone with which to test.\n"; -PyObject* KX_RadarSensor::PyGetConeHeight(PyObject* self) { +PyObject* KX_RadarSensor::PyGetConeHeight() { ShowDeprecationWarning("getConeHeight()", "the distance property"); diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index 080a217b9bd..06c04dbf10d 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -384,7 +384,7 @@ PyObject* KX_RaySensor::pyattr_get_hitobject(void *self_v, const KX_PYATTRIBUTE_ const char KX_RaySensor::GetHitObject_doc[] = "getHitObject()\n" "\tReturns the name of the object that was hit by this ray.\n"; -PyObject* KX_RaySensor::PyGetHitObject(PyObject* self) +PyObject* KX_RaySensor::PyGetHitObject() { ShowDeprecationWarning("getHitObject()", "the hitObject property"); if (m_hitObject) @@ -398,7 +398,7 @@ PyObject* KX_RaySensor::PyGetHitObject(PyObject* self) const char KX_RaySensor::GetHitPosition_doc[] = "getHitPosition()\n" "\tReturns the position (in worldcoordinates) where the object was hit by this ray.\n"; -PyObject* KX_RaySensor::PyGetHitPosition(PyObject* self) +PyObject* KX_RaySensor::PyGetHitPosition() { ShowDeprecationWarning("getHitPosition()", "the hitPosition property"); @@ -414,7 +414,7 @@ PyObject* KX_RaySensor::PyGetHitPosition(PyObject* self) const char KX_RaySensor::GetRayDirection_doc[] = "getRayDirection()\n" "\tReturns the direction from the ray (in worldcoordinates) .\n"; -PyObject* KX_RaySensor::PyGetRayDirection(PyObject* self) +PyObject* KX_RaySensor::PyGetRayDirection() { ShowDeprecationWarning("getRayDirection()", "the rayDirection property"); @@ -430,7 +430,7 @@ PyObject* KX_RaySensor::PyGetRayDirection(PyObject* self) const char KX_RaySensor::GetHitNormal_doc[] = "getHitNormal()\n" "\tReturns the normal (in worldcoordinates) of the object at the location where the object was hit by this ray.\n"; -PyObject* KX_RaySensor::PyGetHitNormal(PyObject* self) +PyObject* KX_RaySensor::PyGetHitNormal() { ShowDeprecationWarning("getHitNormal()", "the hitNormal property"); diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp index 1ab4bd21120..f1c7b757579 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp @@ -271,7 +271,7 @@ const char KX_SCA_AddObjectActuator::SetObject_doc[] = "\t- object: KX_GameObject, string or None\n" "\tSets the object that will be added. There has to be an object\n" "\tof this name. If not, this function does nothing.\n"; -PyObject* KX_SCA_AddObjectActuator::PySetObject(PyObject* self, PyObject* value) +PyObject* KX_SCA_AddObjectActuator::PySetObject(PyObject* value) { KX_GameObject *gameobj; @@ -300,7 +300,7 @@ const char KX_SCA_AddObjectActuator::SetTime_doc[] = "\tIf the duration is negative, it is set to 0.\n"; -PyObject* KX_SCA_AddObjectActuator::PySetTime(PyObject* self, PyObject* value) +PyObject* KX_SCA_AddObjectActuator::PySetTime(PyObject* value) { ShowDeprecationWarning("setTime()", "the time property"); int deltatime = PyInt_AsLong(value); @@ -323,7 +323,7 @@ const char KX_SCA_AddObjectActuator::GetTime_doc[] = "\tReturns the lifetime of the object that will be added.\n"; -PyObject* KX_SCA_AddObjectActuator::PyGetTime(PyObject* self) +PyObject* KX_SCA_AddObjectActuator::PyGetTime() { ShowDeprecationWarning("getTime()", "the time property"); return PyInt_FromLong(m_timeProp); @@ -335,7 +335,7 @@ const char KX_SCA_AddObjectActuator::GetObject_doc[] = "getObject(name_only = 1)\n" "name_only - optional arg, when true will return the KX_GameObject rather then its name\n" "\tReturns the name of the object that will be added.\n"; -PyObject* KX_SCA_AddObjectActuator::PyGetObject(PyObject* self, PyObject* args) +PyObject* KX_SCA_AddObjectActuator::PyGetObject(PyObject* args) { int ret_name_only = 1; @@ -361,7 +361,7 @@ const char KX_SCA_AddObjectActuator::GetLinearVelocity_doc[] = "\tReturns the linear velocity that will be assigned to \n" "\tthe created object.\n"; -PyObject* KX_SCA_AddObjectActuator::PyGetLinearVelocity(PyObject* self) +PyObject* KX_SCA_AddObjectActuator::PyGetLinearVelocity() { ShowDeprecationWarning("getLinearVelocity()", "the linearVelocity property"); PyObject *retVal = PyList_New(3); @@ -384,7 +384,7 @@ const char KX_SCA_AddObjectActuator::SetLinearVelocity_doc[] = "\t- local: bool\n" "\tAssign this velocity to the created object. \n"; -PyObject* KX_SCA_AddObjectActuator::PySetLinearVelocity(PyObject* self, PyObject* args) +PyObject* KX_SCA_AddObjectActuator::PySetLinearVelocity(PyObject* args) { ShowDeprecationWarning("setLinearVelocity()", "the linearVelocity property"); @@ -404,7 +404,7 @@ const char KX_SCA_AddObjectActuator::GetAngularVelocity_doc[] = "\tReturns the angular velocity that will be assigned to \n" "\tthe created object.\n"; -PyObject* KX_SCA_AddObjectActuator::PyGetAngularVelocity(PyObject* self) +PyObject* KX_SCA_AddObjectActuator::PyGetAngularVelocity() { ShowDeprecationWarning("getAngularVelocity()", "the angularVelocity property"); PyObject *retVal = PyList_New(3); @@ -427,7 +427,7 @@ const char KX_SCA_AddObjectActuator::SetAngularVelocity_doc[] = "\t- local: bool\n" "\tAssign this angular velocity to the created object. \n"; -PyObject* KX_SCA_AddObjectActuator::PySetAngularVelocity(PyObject* self, PyObject* args) +PyObject* KX_SCA_AddObjectActuator::PySetAngularVelocity(PyObject* args) { ShowDeprecationWarning("setAngularVelocity()", "the angularVelocity property"); @@ -468,7 +468,7 @@ void KX_SCA_AddObjectActuator::InstantAddObject() } } -PyObject* KX_SCA_AddObjectActuator::PyInstantAddObject(PyObject* self) +PyObject* KX_SCA_AddObjectActuator::PyInstantAddObject() { InstantAddObject(); @@ -483,7 +483,7 @@ const char KX_SCA_AddObjectActuator::GetLastCreatedObject_doc[] = "\tReturn the last created object. \n"; -PyObject* KX_SCA_AddObjectActuator::PyGetLastCreatedObject(PyObject* self) +PyObject* KX_SCA_AddObjectActuator::PyGetLastCreatedObject() { ShowDeprecationWarning("getLastCreatedObject()", "the objectLastCreated property"); SCA_IObject* result = this->GetLastCreatedObject(); diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp index b678b14c2f5..44dedb38429 100644 --- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp @@ -141,7 +141,7 @@ const char KX_SCA_ReplaceMeshActuator::SetMesh_doc[] = "\t- name: string or None\n" "\tSet the mesh that will be substituted for the current one.\n"; -PyObject* KX_SCA_ReplaceMeshActuator::PySetMesh(PyObject* self, PyObject* value) +PyObject* KX_SCA_ReplaceMeshActuator::PySetMesh(PyObject* value) { ShowDeprecationWarning("setMesh()", "the mesh property"); if (value == Py_None) { diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp index 414251d6b06..f54d8542260 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.cpp +++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp @@ -263,9 +263,9 @@ PyMethodDef KX_SceneActuator::Methods[] = {"setUseRestart", (PyCFunction) KX_SceneActuator::sPySetUseRestart, METH_VARARGS, (PY_METHODCHAR)SetUseRestart_doc}, {"setScene", (PyCFunction) KX_SceneActuator::sPySetScene, METH_VARARGS, (PY_METHODCHAR)SetScene_doc}, {"setCamera", (PyCFunction) KX_SceneActuator::sPySetCamera, METH_VARARGS, (PY_METHODCHAR)SetCamera_doc}, - {"getUseRestart", (PyCFunction) KX_SceneActuator::sPyGetUseRestart, METH_VARARGS, (PY_METHODCHAR)GetUseRestart_doc}, - {"getScene", (PyCFunction) KX_SceneActuator::sPyGetScene, METH_VARARGS, (PY_METHODCHAR)GetScene_doc}, - {"getCamera", (PyCFunction) KX_SceneActuator::sPyGetCamera, METH_VARARGS, (PY_METHODCHAR)GetCamera_doc}, + {"getUseRestart", (PyCFunction) KX_SceneActuator::sPyGetUseRestart, METH_NOARGS, (PY_METHODCHAR)GetUseRestart_doc}, + {"getScene", (PyCFunction) KX_SceneActuator::sPyGetScene, METH_NOARGS, (PY_METHODCHAR)GetScene_doc}, + {"getCamera", (PyCFunction) KX_SceneActuator::sPyGetCamera, METH_NOARGS, (PY_METHODCHAR)GetCamera_doc}, //<----- Deprecated {NULL,NULL} //Sentinel }; @@ -353,9 +353,7 @@ const char KX_SceneActuator::SetUseRestart_doc[] = "setUseRestart(flag)\n" "\t- flag: 0 or 1.\n" "\tSet flag to 1 to restart the scene.\n" ; -PyObject* KX_SceneActuator::PySetUseRestart(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_SceneActuator::PySetUseRestart(PyObject* args) { ShowDeprecationWarning("setUseRestart()", "(no replacement)"); int boolArg; @@ -376,9 +374,7 @@ PyObject* KX_SceneActuator::PySetUseRestart(PyObject* self, const char KX_SceneActuator::GetUseRestart_doc[] = "getUseRestart()\n" "\tReturn whether the scene will be restarted.\n" ; -PyObject* KX_SceneActuator::PyGetUseRestart(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_SceneActuator::PyGetUseRestart() { ShowDeprecationWarning("getUseRestart()", "(no replacement)"); return PyInt_FromLong(!(m_restart == 0)); @@ -391,9 +387,7 @@ const char KX_SceneActuator::SetScene_doc[] = "setScene(scene)\n" "\t- scene: string\n" "\tSet the name of scene the actuator will switch to.\n" ; -PyObject* KX_SceneActuator::PySetScene(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_SceneActuator::PySetScene(PyObject* args) { ShowDeprecationWarning("setScene()", "the scene property"); /* one argument: a scene, ignore the rest */ @@ -416,9 +410,7 @@ PyObject* KX_SceneActuator::PySetScene(PyObject* self, const char KX_SceneActuator::GetScene_doc[] = "getScene()\n" "\tReturn the name of the scene the actuator wants to switch to.\n" ; -PyObject* KX_SceneActuator::PyGetScene(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_SceneActuator::PyGetScene() { ShowDeprecationWarning("getScene()", "the scene property"); return PyString_FromString(m_nextSceneName); @@ -431,9 +423,7 @@ const char KX_SceneActuator::SetCamera_doc[] = "setCamera(camera)\n" "\t- camera: string\n" "\tSet the camera to switch to.\n" ; -PyObject* KX_SceneActuator::PySetCamera(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_SceneActuator::PySetCamera(PyObject* args) { ShowDeprecationWarning("setCamera()", "the camera property"); PyObject *cam; @@ -483,9 +473,7 @@ PyObject* KX_SceneActuator::PySetCamera(PyObject* self, const char KX_SceneActuator::GetCamera_doc[] = "getCamera()\n" "\tReturn the name of the camera to switch to.\n" ; -PyObject* KX_SceneActuator::PyGetCamera(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_SceneActuator::PyGetCamera() { ShowDeprecationWarning("getCamera()", "the camera property"); if (m_camera) { diff --git a/source/gameengine/Ketsji/KX_SceneActuator.h b/source/gameengine/Ketsji/KX_SceneActuator.h index f1904f95c2a..803c5106a60 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.h +++ b/source/gameengine/Ketsji/KX_SceneActuator.h @@ -99,17 +99,17 @@ class KX_SceneActuator : public SCA_IActuator /* Removed */ /* 2. setUseRestart: */ - KX_PYMETHOD_DOC(KX_SceneActuator,SetUseRestart); + KX_PYMETHOD_DOC_VARARGS(KX_SceneActuator,SetUseRestart); /* 3. getUseRestart: */ - KX_PYMETHOD_DOC(KX_SceneActuator,GetUseRestart); + KX_PYMETHOD_DOC_NOARGS(KX_SceneActuator,GetUseRestart); /* 4. setScene: */ - KX_PYMETHOD_DOC(KX_SceneActuator,SetScene); + KX_PYMETHOD_DOC_VARARGS(KX_SceneActuator,SetScene); /* 5. getScene: */ - KX_PYMETHOD_DOC(KX_SceneActuator,GetScene); + KX_PYMETHOD_DOC_NOARGS(KX_SceneActuator,GetScene); /* 6. setCamera: */ - KX_PYMETHOD_DOC(KX_SceneActuator,SetCamera); + KX_PYMETHOD_DOC_VARARGS(KX_SceneActuator,SetCamera); /* 7. getCamera: */ - KX_PYMETHOD_DOC(KX_SceneActuator,GetCamera); + KX_PYMETHOD_DOC_NOARGS(KX_SceneActuator,GetCamera); static PyObject* pyattr_get_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index d7449c7effa..eb1d91d760f 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -267,20 +267,20 @@ PyParentObject KX_SoundActuator::Parents[] = { PyMethodDef KX_SoundActuator::Methods[] = { // Deprecated -----> {"setFilename", (PyCFunction) KX_SoundActuator::sPySetFilename, METH_VARARGS,NULL}, - {"getFilename", (PyCFunction) KX_SoundActuator::sPyGetFilename, METH_VARARGS,NULL}, + {"getFilename", (PyCFunction) KX_SoundActuator::sPyGetFilename, METH_NOARGS,NULL}, {"setGain",(PyCFunction) KX_SoundActuator::sPySetGain,METH_VARARGS,NULL}, - {"getGain",(PyCFunction) KX_SoundActuator::sPyGetGain,METH_VARARGS,NULL}, + {"getGain",(PyCFunction) KX_SoundActuator::sPyGetGain,METH_NOARGS,NULL}, {"setPitch",(PyCFunction) KX_SoundActuator::sPySetPitch,METH_VARARGS,NULL}, - {"getPitch",(PyCFunction) KX_SoundActuator::sPyGetPitch,METH_VARARGS,NULL}, + {"getPitch",(PyCFunction) KX_SoundActuator::sPyGetPitch,METH_NOARGS,NULL}, {"setRollOffFactor",(PyCFunction) KX_SoundActuator::sPySetRollOffFactor,METH_VARARGS,NULL}, - {"getRollOffFactor",(PyCFunction) KX_SoundActuator::sPyGetRollOffFactor,METH_VARARGS,NULL}, + {"getRollOffFactor",(PyCFunction) KX_SoundActuator::sPyGetRollOffFactor,METH_NOARGS,NULL}, {"setLooping",(PyCFunction) KX_SoundActuator::sPySetLooping,METH_VARARGS,NULL}, - {"getLooping",(PyCFunction) KX_SoundActuator::sPyGetLooping,METH_VARARGS,NULL}, + {"getLooping",(PyCFunction) KX_SoundActuator::sPyGetLooping,METH_NOARGS,NULL}, {"setPosition",(PyCFunction) KX_SoundActuator::sPySetPosition,METH_VARARGS,NULL}, {"setVelocity",(PyCFunction) KX_SoundActuator::sPySetVelocity,METH_VARARGS,NULL}, {"setOrientation",(PyCFunction) KX_SoundActuator::sPySetOrientation,METH_VARARGS,NULL}, {"setType",(PyCFunction) KX_SoundActuator::sPySetType,METH_VARARGS,NULL}, - {"getType",(PyCFunction) KX_SoundActuator::sPyGetType,METH_VARARGS,NULL}, + {"getType",(PyCFunction) KX_SoundActuator::sPyGetType,METH_NOARGS,NULL}, // <----- KX_PYMETHODTABLE_NOARGS(KX_SoundActuator, startSound), @@ -587,7 +587,7 @@ int KX_SoundActuator::pyattr_set_orientation(void *self, const struct KX_PYATTRI } // Deprecated -----> -PyObject* KX_SoundActuator::PySetFilename(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetFilename(PyObject* args) { char *soundName = NULL; ShowDeprecationWarning("setFilename()", "the filename property"); @@ -599,7 +599,7 @@ PyObject* KX_SoundActuator::PySetFilename(PyObject* self, PyObject* args, PyObje Py_RETURN_NONE; } -PyObject* KX_SoundActuator::PyGetFilename(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PyGetFilename() { ShowDeprecationWarning("getFilename()", "the filename property"); if (!m_soundObject) @@ -616,7 +616,7 @@ PyObject* KX_SoundActuator::PyGetFilename(PyObject* self, PyObject* args, PyObje return PyString_FromString(name); } -PyObject* KX_SoundActuator::PySetGain(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetGain(PyObject* args) { ShowDeprecationWarning("setGain()", "the volume property"); float gain = 1.0; @@ -631,7 +631,7 @@ PyObject* KX_SoundActuator::PySetGain(PyObject* self, PyObject* args, PyObject* -PyObject* KX_SoundActuator::PyGetGain(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PyGetGain() { ShowDeprecationWarning("getGain()", "the volume property"); float gain = (m_soundObject) ? m_soundObject->GetGain() : 1.0f; @@ -642,7 +642,7 @@ PyObject* KX_SoundActuator::PyGetGain(PyObject* self, PyObject* args, PyObject* -PyObject* KX_SoundActuator::PySetPitch(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetPitch(PyObject* args) { ShowDeprecationWarning("setPitch()", "the pitch property"); float pitch = 1.0; @@ -657,7 +657,7 @@ PyObject* KX_SoundActuator::PySetPitch(PyObject* self, PyObject* args, PyObject* -PyObject* KX_SoundActuator::PyGetPitch(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PyGetPitch() { ShowDeprecationWarning("getPitch()", "the pitch property"); float pitch = (m_soundObject) ? m_soundObject->GetPitch() : 1.0; @@ -668,7 +668,7 @@ PyObject* KX_SoundActuator::PyGetPitch(PyObject* self, PyObject* args, PyObject* -PyObject* KX_SoundActuator::PySetRollOffFactor(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetRollOffFactor(PyObject* args) { ShowDeprecationWarning("setRollOffFactor()", "the rollOffFactor property"); float rollofffactor = 1.0; @@ -683,7 +683,7 @@ PyObject* KX_SoundActuator::PySetRollOffFactor(PyObject* self, PyObject* args, P -PyObject* KX_SoundActuator::PyGetRollOffFactor(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PyGetRollOffFactor() { ShowDeprecationWarning("getRollOffFactor()", "the rollOffFactor property"); float rollofffactor = (m_soundObject) ? m_soundObject->GetRollOffFactor() : 1.0; @@ -694,7 +694,7 @@ PyObject* KX_SoundActuator::PyGetRollOffFactor(PyObject* self, PyObject* args, P -PyObject* KX_SoundActuator::PySetLooping(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetLooping(PyObject* args) { ShowDeprecationWarning("setLooping()", "the looping property"); bool looping = 1; @@ -709,7 +709,7 @@ PyObject* KX_SoundActuator::PySetLooping(PyObject* self, PyObject* args, PyObjec -PyObject* KX_SoundActuator::PyGetLooping(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PyGetLooping() { ShowDeprecationWarning("getLooping()", "the looping property"); int looping = (m_soundObject) ? m_soundObject->GetLoopMode() : (int)SND_LOOP_OFF; @@ -720,7 +720,7 @@ PyObject* KX_SoundActuator::PyGetLooping(PyObject* self, PyObject* args, PyObjec -PyObject* KX_SoundActuator::PySetPosition(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetPosition(PyObject* args) { MT_Point3 pos; ShowDeprecationWarning("setPosition()", "the position property"); @@ -739,7 +739,7 @@ PyObject* KX_SoundActuator::PySetPosition(PyObject* self, PyObject* args, PyObje -PyObject* KX_SoundActuator::PySetVelocity(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetVelocity(PyObject* args) { MT_Vector3 vel; ShowDeprecationWarning("setVelocity()", "the velocity property"); @@ -758,7 +758,7 @@ PyObject* KX_SoundActuator::PySetVelocity(PyObject* self, PyObject* args, PyObje -PyObject* KX_SoundActuator::PySetOrientation(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetOrientation(PyObject* args) { MT_Matrix3x3 ori; ShowDeprecationWarning("setOrientation()", "the orientation property"); @@ -781,7 +781,7 @@ PyObject* KX_SoundActuator::PySetOrientation(PyObject* self, PyObject* args, PyO Py_RETURN_NONE; } -PyObject* KX_SoundActuator::PySetType(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PySetType(PyObject* args) { int typeArg; ShowDeprecationWarning("setType()", "the type property"); @@ -798,7 +798,7 @@ PyObject* KX_SoundActuator::PySetType(PyObject* self, PyObject* args, PyObject* Py_RETURN_NONE; } -PyObject* KX_SoundActuator::PyGetType(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_SoundActuator::PyGetType() { ShowDeprecationWarning("getType()", "the type property"); return PyInt_FromLong(m_type); diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h index eb18ba9f13e..d5e678bbecd 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.h +++ b/source/gameengine/Ketsji/KX_SoundActuator.h @@ -108,21 +108,21 @@ public: static PyObject* pyattr_get_type(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); // Deprecated -----> - KX_PYMETHOD(KX_SoundActuator,SetFilename); - KX_PYMETHOD(KX_SoundActuator,GetFilename); - KX_PYMETHOD(KX_SoundActuator,SetGain); - KX_PYMETHOD(KX_SoundActuator,GetGain); - KX_PYMETHOD(KX_SoundActuator,SetPitch); - KX_PYMETHOD(KX_SoundActuator,GetPitch); - KX_PYMETHOD(KX_SoundActuator,SetRollOffFactor); - KX_PYMETHOD(KX_SoundActuator,GetRollOffFactor); - KX_PYMETHOD(KX_SoundActuator,SetLooping); - KX_PYMETHOD(KX_SoundActuator,GetLooping); - KX_PYMETHOD(KX_SoundActuator,SetPosition); - KX_PYMETHOD(KX_SoundActuator,SetVelocity); - KX_PYMETHOD(KX_SoundActuator,SetOrientation); - KX_PYMETHOD(KX_SoundActuator,SetType); - KX_PYMETHOD(KX_SoundActuator,GetType); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetFilename); + KX_PYMETHOD_NOARGS(KX_SoundActuator,GetFilename); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetGain); + KX_PYMETHOD_NOARGS(KX_SoundActuator,GetGain); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetPitch); + KX_PYMETHOD_NOARGS(KX_SoundActuator,GetPitch); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetRollOffFactor); + KX_PYMETHOD_NOARGS(KX_SoundActuator,GetRollOffFactor); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetLooping); + KX_PYMETHOD_NOARGS(KX_SoundActuator,GetLooping); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetPosition); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetVelocity); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetOrientation); + KX_PYMETHOD_VARARGS(KX_SoundActuator,SetType); + KX_PYMETHOD_NOARGS(KX_SoundActuator,GetType); // <----- }; diff --git a/source/gameengine/Ketsji/KX_StateActuator.cpp b/source/gameengine/Ketsji/KX_StateActuator.cpp index 3cfa40c6f80..976e7ea5204 100644 --- a/source/gameengine/Ketsji/KX_StateActuator.cpp +++ b/source/gameengine/Ketsji/KX_StateActuator.cpp @@ -173,9 +173,7 @@ KX_StateActuator::SetOperation_doc[] = "\tUse setMask() to specify the bits that will be modified.\n"; PyObject* -KX_StateActuator::PySetOperation(PyObject* self, - PyObject* args, - PyObject* kwds) { +KX_StateActuator::PySetOperation(PyObject* args) { ShowDeprecationWarning("setOperation()", "the operation property"); int oper; @@ -199,9 +197,7 @@ KX_StateActuator::SetMask_doc[] = "\twhich copies the value to the object state.\n"; PyObject* -KX_StateActuator::PySetMask(PyObject* self, - PyObject* args, - PyObject* kwds) { +KX_StateActuator::PySetMask(PyObject* args) { ShowDeprecationWarning("setMask()", "the mask property"); int mask; diff --git a/source/gameengine/Ketsji/KX_StateActuator.h b/source/gameengine/Ketsji/KX_StateActuator.h index 426753dadfd..4a64894259d 100644 --- a/source/gameengine/Ketsji/KX_StateActuator.h +++ b/source/gameengine/Ketsji/KX_StateActuator.h @@ -78,8 +78,8 @@ class KX_StateActuator : public SCA_IActuator virtual PyObject* py_getattro(PyObject *attr); virtual int py_setattro(PyObject *attr, PyObject* value); //KX_PYMETHOD_DOC - KX_PYMETHOD_DOC(KX_StateActuator,SetOperation); - KX_PYMETHOD_DOC(KX_StateActuator,SetMask); + KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetOperation); + KX_PYMETHOD_DOC_VARARGS(KX_StateActuator,SetMask); }; #endif diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index 79da4984740..e7f8acbd1a8 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -310,7 +310,7 @@ const char KX_TouchSensor::SetProperty_doc[] = "\tSet the property or material to collide with. Use\n" "\tsetTouchMaterial() to switch between properties and\n" "\tmaterials."; -PyObject* KX_TouchSensor::PySetProperty(PyObject* self, PyObject* value) +PyObject* KX_TouchSensor::PySetProperty(PyObject* value) { ShowDeprecationWarning("setProperty()", "the propertyName property"); char *nameArg= PyString_AsString(value); @@ -328,14 +328,14 @@ const char KX_TouchSensor::GetProperty_doc[] = "\tReturns the property or material to collide with. Use\n" "\tgetTouchMaterial() to find out whether this sensor\n" "\tlooks for properties or materials."; -PyObject* KX_TouchSensor::PyGetProperty(PyObject* self) { +PyObject* KX_TouchSensor::PyGetProperty() { return PyString_FromString(m_touchedpropname); } const char KX_TouchSensor::GetHitObject_doc[] = "getHitObject()\n" ; -PyObject* KX_TouchSensor::PyGetHitObject(PyObject* self) +PyObject* KX_TouchSensor::PyGetHitObject() { ShowDeprecationWarning("getHitObject()", "the objectHit property"); /* to do: do Py_IncRef if the object is already known in Python */ @@ -351,7 +351,7 @@ const char KX_TouchSensor::GetHitObjectList_doc[] = "getHitObjectList()\n" "\tReturn a list of the objects this object collided with,\n" "\tbut only those matching the property/material condition.\n"; -PyObject* KX_TouchSensor::PyGetHitObjectList(PyObject* self) +PyObject* KX_TouchSensor::PyGetHitObjectList() { ShowDeprecationWarning("getHitObjectList()", "the objectHitList property"); /* to do: do Py_IncRef if the object is already known in Python */ @@ -367,7 +367,7 @@ const char KX_TouchSensor::GetTouchMaterial_doc[] = "getTouchMaterial()\n" "\tReturns KX_TRUE if this sensor looks for a specific material,\n" "\tKX_FALSE if it looks for a specific property.\n" ; -PyObject* KX_TouchSensor::PyGetTouchMaterial(PyObject* self) +PyObject* KX_TouchSensor::PyGetTouchMaterial() { ShowDeprecationWarning("getTouchMaterial()", "the materialCheck property"); return PyInt_FromLong(m_bFindMaterial); @@ -380,7 +380,7 @@ const char KX_TouchSensor::SetTouchMaterial_doc[] = "\t- flag: KX_TRUE or KX_FALSE.\n" "\tSet flag to KX_TRUE to switch on positive pulse mode,\n" "\tKX_FALSE to switch off positive pulse mode.\n" ; -PyObject* KX_TouchSensor::PySetTouchMaterial(PyObject* self, PyObject *value) +PyObject* KX_TouchSensor::PySetTouchMaterial(PyObject *value) { int pulseArg = PyInt_AsLong(value); diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index 6c522b35528..c89d88389c4 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -458,9 +458,9 @@ PyParentObject KX_TrackToActuator::Parents[] = { PyMethodDef KX_TrackToActuator::Methods[] = { // ---> deprecated {"setTime", (PyCFunction) KX_TrackToActuator::sPySetTime, METH_VARARGS, (PY_METHODCHAR)SetTime_doc}, - {"getTime", (PyCFunction) KX_TrackToActuator::sPyGetTime, METH_VARARGS, (PY_METHODCHAR)GetTime_doc}, + {"getTime", (PyCFunction) KX_TrackToActuator::sPyGetTime, METH_NOARGS, (PY_METHODCHAR)GetTime_doc}, {"setUse3D", (PyCFunction) KX_TrackToActuator::sPySetUse3D, METH_VARARGS, (PY_METHODCHAR)SetUse3D_doc}, - {"getUse3D", (PyCFunction) KX_TrackToActuator::sPyGetUse3D, METH_VARARGS, (PY_METHODCHAR)GetUse3D_doc}, + {"getUse3D", (PyCFunction) KX_TrackToActuator::sPyGetUse3D, METH_NOARGS, (PY_METHODCHAR)GetUse3D_doc}, {"setObject", (PyCFunction) KX_TrackToActuator::sPySetObject, METH_O, (PY_METHODCHAR)SetObject_doc}, {"getObject", (PyCFunction) KX_TrackToActuator::sPyGetObject, METH_VARARGS, (PY_METHODCHAR)GetObject_doc}, @@ -519,7 +519,7 @@ const char KX_TrackToActuator::SetObject_doc[] = "setObject(object)\n" "\t- object: KX_GameObject, string or None\n" "\tSet the object to track with the parent of this actuator.\n"; -PyObject* KX_TrackToActuator::PySetObject(PyObject* self, PyObject* value) +PyObject* KX_TrackToActuator::PySetObject(PyObject* value) { KX_GameObject *gameobj; @@ -545,7 +545,7 @@ const char KX_TrackToActuator::GetObject_doc[] = "getObject(name_only = 1)\n" "name_only - optional arg, when true will return the KX_GameObject rather then its name\n" "\tReturns the object to track with the parent of this actuator\n"; -PyObject* KX_TrackToActuator::PyGetObject(PyObject* self, PyObject* args) +PyObject* KX_TrackToActuator::PyGetObject(PyObject* args) { int ret_name_only = 1; @@ -570,7 +570,7 @@ const char KX_TrackToActuator::SetTime_doc[] = "setTime(time)\n" "\t- time: integer\n" "\tSet the time in frames with which to delay the tracking motion.\n"; -PyObject* KX_TrackToActuator::PySetTime(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_TrackToActuator::PySetTime(PyObject* args) { ShowDeprecationWarning("setTime()", "the timer property"); int timeArg; @@ -592,7 +592,7 @@ const char KX_TrackToActuator::GetTime_doc[] = "getTime()\n" "\t- time: integer\n" "\tReturn the time in frames with which the tracking motion is delayed.\n"; -PyObject* KX_TrackToActuator::PyGetTime(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_TrackToActuator::PyGetTime() { ShowDeprecationWarning("getTime()", "the timer property"); return PyInt_FromLong(m_time); @@ -604,7 +604,7 @@ PyObject* KX_TrackToActuator::PyGetTime(PyObject* self, PyObject* args, PyObject const char KX_TrackToActuator::GetUse3D_doc[] = "getUse3D()\n" "\tReturns 1 if the motion is allowed to extend in the z-direction.\n"; -PyObject* KX_TrackToActuator::PyGetUse3D(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_TrackToActuator::PyGetUse3D() { ShowDeprecationWarning("setTime()", "the use3D property"); return PyInt_FromLong(!(m_allow3D == 0)); @@ -618,7 +618,7 @@ const char KX_TrackToActuator::SetUse3D_doc[] = "\t- value: 0 or 1\n" "\tSet to 1 to allow the tracking motion to extend in the z-direction,\n" "\tset to 0 to lock the tracking motion to the x-y plane.\n"; -PyObject* KX_TrackToActuator::PySetUse3D(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* KX_TrackToActuator::PySetUse3D(PyObject* args) { ShowDeprecationWarning("setTime()", "the use3D property"); int boolArg; diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.h b/source/gameengine/Ketsji/KX_TrackToActuator.h index cc4049e19a8..99505f93cfe 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.h +++ b/source/gameengine/Ketsji/KX_TrackToActuator.h @@ -84,13 +84,13 @@ class KX_TrackToActuator : public SCA_IActuator /* 2. getObject */ KX_PYMETHOD_DOC_VARARGS(KX_TrackToActuator,GetObject); /* 3. setTime */ - KX_PYMETHOD_DOC(KX_TrackToActuator,SetTime); + KX_PYMETHOD_DOC_VARARGS(KX_TrackToActuator,SetTime); /* 4. getTime */ - KX_PYMETHOD_DOC(KX_TrackToActuator,GetTime); + KX_PYMETHOD_DOC_NOARGS(KX_TrackToActuator,GetTime); /* 5. getUse3D */ - KX_PYMETHOD_DOC(KX_TrackToActuator,GetUse3D); + KX_PYMETHOD_DOC_NOARGS(KX_TrackToActuator,GetUse3D); /* 6. setUse3D */ - KX_PYMETHOD_DOC(KX_TrackToActuator,SetUse3D); + KX_PYMETHOD_DOC_VARARGS(KX_TrackToActuator,SetUse3D); }; /* end of class KX_TrackToActuator : public KX_EditObjectActuator */ diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp index 558b2849cc7..f77c135e994 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp @@ -35,9 +35,7 @@ KX_VehicleWrapper::~KX_VehicleWrapper() } -PyObject* KX_VehicleWrapper::PyAddWheel(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyAddWheel(PyObject* args) { PyObject* pylistPos,*pylistDir,*pylistAxleDir; @@ -85,9 +83,7 @@ PyObject* KX_VehicleWrapper::PyAddWheel(PyObject* self, -PyObject* KX_VehicleWrapper::PyGetWheelPosition(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyGetWheelPosition(PyObject* args) { int wheelIndex; @@ -102,9 +98,7 @@ PyObject* KX_VehicleWrapper::PyGetWheelPosition(PyObject* self, return NULL; } -PyObject* KX_VehicleWrapper::PyGetWheelRotation(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyGetWheelRotation(PyObject* args) { int wheelIndex; if (PyArg_ParseTuple(args,"i:getWheelRotation",&wheelIndex)) @@ -114,9 +108,7 @@ PyObject* KX_VehicleWrapper::PyGetWheelRotation(PyObject* self, return NULL; } -PyObject* KX_VehicleWrapper::PyGetWheelOrientationQuaternion(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyGetWheelOrientationQuaternion(PyObject* args) { int wheelIndex; if (PyArg_ParseTuple(args,"i:getWheelOrientationQuaternion",&wheelIndex)) @@ -132,26 +124,20 @@ PyObject* KX_VehicleWrapper::PyGetWheelOrientationQuaternion(PyObject* self, } -PyObject* KX_VehicleWrapper::PyGetNumWheels(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyGetNumWheels(PyObject* args) { return PyInt_FromLong(m_vehicle->GetNumWheels()); } -PyObject* KX_VehicleWrapper::PyGetConstraintId(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyGetConstraintId(PyObject* args) { return PyInt_FromLong(m_vehicle->GetUserConstraintId()); } -PyObject* KX_VehicleWrapper::PyApplyEngineForce(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyApplyEngineForce(PyObject* args) { float force; int wheelIndex; @@ -167,9 +153,7 @@ PyObject* KX_VehicleWrapper::PyApplyEngineForce(PyObject* self, Py_RETURN_NONE; } -PyObject* KX_VehicleWrapper::PySetTyreFriction(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PySetTyreFriction(PyObject* args) { float wheelFriction; int wheelIndex; @@ -184,9 +168,7 @@ PyObject* KX_VehicleWrapper::PySetTyreFriction(PyObject* self, Py_RETURN_NONE; } -PyObject* KX_VehicleWrapper::PySetSuspensionStiffness(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PySetSuspensionStiffness(PyObject* args) { float suspensionStiffness; int wheelIndex; @@ -201,9 +183,7 @@ PyObject* KX_VehicleWrapper::PySetSuspensionStiffness(PyObject* self, Py_RETURN_NONE; } -PyObject* KX_VehicleWrapper::PySetSuspensionDamping(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PySetSuspensionDamping(PyObject* args) { float suspensionDamping; int wheelIndex; @@ -217,9 +197,7 @@ PyObject* KX_VehicleWrapper::PySetSuspensionDamping(PyObject* self, Py_RETURN_NONE; } -PyObject* KX_VehicleWrapper::PySetSuspensionCompression(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PySetSuspensionCompression(PyObject* args) { float suspensionCompression; int wheelIndex; @@ -233,9 +211,7 @@ PyObject* KX_VehicleWrapper::PySetSuspensionCompression(PyObject* self, Py_RETURN_NONE; } -PyObject* KX_VehicleWrapper::PySetRollInfluence(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PySetRollInfluence(PyObject* args) { float rollInfluence; int wheelIndex; @@ -251,9 +227,7 @@ PyObject* KX_VehicleWrapper::PySetRollInfluence(PyObject* self, } -PyObject* KX_VehicleWrapper::PyApplyBraking(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyApplyBraking(PyObject* args) { float braking; int wheelIndex; @@ -271,9 +245,7 @@ PyObject* KX_VehicleWrapper::PyApplyBraking(PyObject* self, -PyObject* KX_VehicleWrapper::PySetSteeringValue(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PySetSteeringValue(PyObject* args) { float steeringValue; int wheelIndex; @@ -289,9 +261,7 @@ PyObject* KX_VehicleWrapper::PySetSteeringValue(PyObject* self, } -PyObject* KX_VehicleWrapper::PyGetConstraintType(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* KX_VehicleWrapper::PyGetConstraintType(PyObject* args) { return PyInt_FromLong(m_vehicle->GetUserConstraintType()); } diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.h b/source/gameengine/Ketsji/KX_VehicleWrapper.h index 4e03183bf85..de7fe75cfba 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.h +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.h @@ -23,31 +23,31 @@ public: int getConstraintId(); - KX_PYMETHOD(KX_VehicleWrapper,AddWheel); - KX_PYMETHOD(KX_VehicleWrapper,GetNumWheels); - KX_PYMETHOD(KX_VehicleWrapper,GetWheelOrientationQuaternion); - KX_PYMETHOD(KX_VehicleWrapper,GetWheelRotation); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,AddWheel); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetNumWheels); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetWheelOrientationQuaternion); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetWheelRotation); - KX_PYMETHOD(KX_VehicleWrapper,GetWheelPosition); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetWheelPosition); - KX_PYMETHOD(KX_VehicleWrapper,GetConstraintId); - KX_PYMETHOD(KX_VehicleWrapper,GetConstraintType); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetConstraintId); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,GetConstraintType); - KX_PYMETHOD(KX_VehicleWrapper,SetSteeringValue); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSteeringValue); - KX_PYMETHOD(KX_VehicleWrapper,ApplyEngineForce); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,ApplyEngineForce); - KX_PYMETHOD(KX_VehicleWrapper,ApplyBraking); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,ApplyBraking); - KX_PYMETHOD(KX_VehicleWrapper,SetTyreFriction); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetTyreFriction); - KX_PYMETHOD(KX_VehicleWrapper,SetSuspensionStiffness); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionStiffness); - KX_PYMETHOD(KX_VehicleWrapper,SetSuspensionDamping); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionDamping); - KX_PYMETHOD(KX_VehicleWrapper,SetSuspensionCompression); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionCompression); - KX_PYMETHOD(KX_VehicleWrapper,SetRollInfluence); + KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetRollInfluence); private: diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp index 4954e94f3e4..8be125011bb 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.cpp +++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp @@ -341,12 +341,12 @@ void KX_VertexProxy::ReplicaSetName(STR_String) {}; // stuff for python integration -PyObject* KX_VertexProxy::PyGetXYZ(PyObject*) +PyObject* KX_VertexProxy::PyGetXYZ() { return PyObjectFrom(MT_Point3(m_vertex->getXYZ())); } -PyObject* KX_VertexProxy::PySetXYZ(PyObject*, PyObject* value) +PyObject* KX_VertexProxy::PySetXYZ(PyObject* value) { MT_Point3 vec; if (!PyVecTo(value, vec)) @@ -357,12 +357,12 @@ PyObject* KX_VertexProxy::PySetXYZ(PyObject*, PyObject* value) Py_RETURN_NONE; } -PyObject* KX_VertexProxy::PyGetNormal(PyObject*) +PyObject* KX_VertexProxy::PyGetNormal() { return PyObjectFrom(MT_Vector3(m_vertex->getNormal())); } -PyObject* KX_VertexProxy::PySetNormal(PyObject*, PyObject* value) +PyObject* KX_VertexProxy::PySetNormal(PyObject* value) { MT_Vector3 vec; if (!PyVecTo(value, vec)) @@ -374,13 +374,13 @@ PyObject* KX_VertexProxy::PySetNormal(PyObject*, PyObject* value) } -PyObject* KX_VertexProxy::PyGetRGBA(PyObject*) +PyObject* KX_VertexProxy::PyGetRGBA() { int *rgba = (int *) m_vertex->getRGBA(); return PyInt_FromLong(*rgba); } -PyObject* KX_VertexProxy::PySetRGBA(PyObject*, PyObject* value) +PyObject* KX_VertexProxy::PySetRGBA(PyObject* value) { if PyInt_Check(value) { int rgba = PyInt_AsLong(value); @@ -403,12 +403,12 @@ PyObject* KX_VertexProxy::PySetRGBA(PyObject*, PyObject* value) } -PyObject* KX_VertexProxy::PyGetUV(PyObject*) +PyObject* KX_VertexProxy::PyGetUV() { return PyObjectFrom(MT_Vector2(m_vertex->getUV1())); } -PyObject* KX_VertexProxy::PySetUV(PyObject*, PyObject* value) +PyObject* KX_VertexProxy::PySetUV(PyObject* value) { MT_Point2 vec; if (!PyVecTo(value, vec)) @@ -419,12 +419,12 @@ PyObject* KX_VertexProxy::PySetUV(PyObject*, PyObject* value) Py_RETURN_NONE; } -PyObject* KX_VertexProxy::PyGetUV2(PyObject*) +PyObject* KX_VertexProxy::PyGetUV2() { return PyObjectFrom(MT_Vector2(m_vertex->getUV2())); } -PyObject* KX_VertexProxy::PySetUV2(PyObject*, PyObject* args) +PyObject* KX_VertexProxy::PySetUV2(PyObject* args) { MT_Point2 vec; unsigned int unit=0; diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp index 6d984f0d77a..ba59d0d3d47 100644 --- a/source/gameengine/Ketsji/KX_VisibilityActuator.cpp +++ b/source/gameengine/Ketsji/KX_VisibilityActuator.cpp @@ -157,9 +157,7 @@ KX_VisibilityActuator::SetVisible_doc[] = "\tSet the properties of the actuator.\n"; PyObject* -KX_VisibilityActuator::PySetVisible(PyObject* self, - PyObject* args, - PyObject* kwds) { +KX_VisibilityActuator::PySetVisible(PyObject* args) { int vis; ShowDeprecationWarning("SetVisible()", "the visible property"); diff --git a/source/gameengine/Ketsji/KX_VisibilityActuator.h b/source/gameengine/Ketsji/KX_VisibilityActuator.h index 4269258f862..04633bce665 100644 --- a/source/gameengine/Ketsji/KX_VisibilityActuator.h +++ b/source/gameengine/Ketsji/KX_VisibilityActuator.h @@ -73,7 +73,7 @@ class KX_VisibilityActuator : public SCA_IActuator virtual int py_setattro(PyObject *attr, PyObject *value); // Deprecated -----> - KX_PYMETHOD_DOC(KX_VisibilityActuator,SetVisible); + KX_PYMETHOD_DOC_VARARGS(KX_VisibilityActuator,SetVisible); // <----- |