From 6bc162e679d8b52b28e205de76985a1735abbf0a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 19 Apr 2009 17:29:07 +0000 Subject: BGE Python API removed redundant (PyObject *self) argument from python functions that are not exposed to python directly. --- source/gameengine/Converter/BL_ActionActuator.cpp | 64 ++++++----------- .../Converter/BL_ShapeActionActuator.cpp | 58 +++++----------- .../gameengine/Converter/BL_ShapeActionActuator.h | 22 +++--- source/gameengine/Expressions/ListValue.cpp | 12 ++-- source/gameengine/Expressions/PyObjectPlus.cpp | 2 +- source/gameengine/Expressions/PyObjectPlus.h | 50 ++++++-------- source/gameengine/Expressions/Value.cpp | 4 +- source/gameengine/GameLogic/SCA_ActuatorSensor.cpp | 4 +- source/gameengine/GameLogic/SCA_ActuatorSensor.h | 2 +- source/gameengine/GameLogic/SCA_DelaySensor.cpp | 12 ++-- source/gameengine/GameLogic/SCA_DelaySensor.h | 6 +- source/gameengine/GameLogic/SCA_ILogicBrick.cpp | 8 +-- source/gameengine/GameLogic/SCA_ILogicBrick.h | 2 +- source/gameengine/GameLogic/SCA_ISensor.cpp | 24 +++---- source/gameengine/GameLogic/SCA_ISensor.h | 10 +-- source/gameengine/GameLogic/SCA_JoystickSensor.cpp | 38 +++++----- source/gameengine/GameLogic/SCA_KeyboardSensor.cpp | 26 +++---- source/gameengine/GameLogic/SCA_KeyboardSensor.h | 16 ++--- source/gameengine/GameLogic/SCA_MouseSensor.cpp | 8 +-- source/gameengine/GameLogic/SCA_MouseSensor.h | 4 +- .../gameengine/GameLogic/SCA_PropertyActuator.cpp | 8 +-- source/gameengine/GameLogic/SCA_PropertySensor.cpp | 20 +++--- source/gameengine/GameLogic/SCA_PropertySensor.h | 12 ++-- .../gameengine/GameLogic/SCA_PythonController.cpp | 29 ++++---- source/gameengine/GameLogic/SCA_RandomActuator.cpp | 29 ++++---- source/gameengine/GameLogic/SCA_RandomActuator.h | 14 ++-- source/gameengine/GameLogic/SCA_RandomSensor.cpp | 10 +-- source/gameengine/GameLogic/SCA_RandomSensor.h | 8 +-- .../Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp | 4 -- .../Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp | 10 +-- source/gameengine/Ketsji/KX_CDActuator.cpp | 4 +- source/gameengine/Ketsji/KX_CDActuator.h | 4 +- source/gameengine/Ketsji/KX_CameraActuator.cpp | 38 +++------- source/gameengine/Ketsji/KX_CameraActuator.h | 16 ++--- source/gameengine/Ketsji/KX_ConstraintActuator.cpp | 54 +++++---------- source/gameengine/Ketsji/KX_ConstraintActuator.h | 18 ++--- source/gameengine/Ketsji/KX_ConstraintWrapper.cpp | 9 +-- source/gameengine/Ketsji/KX_GameActuator.cpp | 4 +- source/gameengine/Ketsji/KX_GameObject.cpp | 80 +++++++++++----------- source/gameengine/Ketsji/KX_IpoActuator.cpp | 44 ++++-------- source/gameengine/Ketsji/KX_IpoActuator.h | 16 ++--- source/gameengine/Ketsji/KX_MeshProxy.cpp | 26 ++----- source/gameengine/Ketsji/KX_MouseFocusSensor.cpp | 12 ++-- source/gameengine/Ketsji/KX_ObjectActuator.cpp | 66 ++++++------------ source/gameengine/Ketsji/KX_ObjectActuator.h | 22 +++--- source/gameengine/Ketsji/KX_ParentActuator.cpp | 4 +- .../gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp | 16 ++--- source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h | 8 +-- source/gameengine/Ketsji/KX_PolyProxy.cpp | 4 +- source/gameengine/Ketsji/KX_PythonInit.cpp | 8 +-- source/gameengine/Ketsji/KX_PythonInitTypes.cpp | 2 +- source/gameengine/Ketsji/KX_RadarSensor.cpp | 6 +- source/gameengine/Ketsji/KX_RaySensor.cpp | 8 +-- .../gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp | 20 +++--- .../Ketsji/KX_SCA_ReplaceMeshActuator.cpp | 2 +- source/gameengine/Ketsji/KX_SceneActuator.cpp | 30 +++----- source/gameengine/Ketsji/KX_SceneActuator.h | 12 ++-- source/gameengine/Ketsji/KX_SoundActuator.cpp | 42 ++++++------ source/gameengine/Ketsji/KX_SoundActuator.h | 30 ++++---- source/gameengine/Ketsji/KX_StateActuator.cpp | 8 +-- source/gameengine/Ketsji/KX_StateActuator.h | 4 +- source/gameengine/Ketsji/KX_TouchSensor.cpp | 12 ++-- source/gameengine/Ketsji/KX_TrackToActuator.cpp | 16 ++--- source/gameengine/Ketsji/KX_TrackToActuator.h | 8 +-- source/gameengine/Ketsji/KX_VehicleWrapper.cpp | 60 ++++------------ source/gameengine/Ketsji/KX_VehicleWrapper.h | 30 ++++---- source/gameengine/Ketsji/KX_VertexProxy.cpp | 20 +++--- source/gameengine/Ketsji/KX_VisibilityActuator.cpp | 4 +- source/gameengine/Ketsji/KX_VisibilityActuator.h | 2 +- .../Physics/Bullet/CcdPhysicsController.h | 8 +-- 70 files changed, 545 insertions(+), 748 deletions(-) (limited to 'source/gameengine') diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp index 530a74dfb12..f413ad969f4 100644 --- a/source/gameengine/Converter/BL_ActionActuator.cpp +++ b/source/gameengine/Converter/BL_ActionActuator.cpp @@ -423,8 +423,7 @@ const char BL_ActionActuator::GetAction_doc[] = "getAction()\n" "\tReturns a string containing the name of the current action.\n"; -PyObject* BL_ActionActuator::PyGetAction(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetAction(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getAction()", "the action property"); @@ -439,8 +438,7 @@ const char BL_ActionActuator::GetProperty_doc[] = "getProperty()\n" "\tReturns the name of the property to be used in FromProp mode.\n"; -PyObject* BL_ActionActuator::PyGetProperty(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetProperty(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getProperty()", "the property property"); @@ -456,8 +454,7 @@ const char BL_ActionActuator::GetFrameProperty_doc[] = "getFrameProperty()\n" "\tReturns the name of the property, that is set to the current frame number.\n"; -PyObject* BL_ActionActuator::PyGetFrameProperty(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetFrameProperty(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getFrameProperty()", "the frameProperty property"); @@ -473,8 +470,7 @@ const char BL_ActionActuator::GetFrame_doc[] = "getFrame()\n" "\tReturns the current frame number.\n"; -PyObject* BL_ActionActuator::PyGetFrame(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetFrame(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getFrame()", "the frame property"); @@ -490,8 +486,7 @@ const char BL_ActionActuator::GetEnd_doc[] = "getEnd()\n" "\tReturns the last frame of the action.\n"; -PyObject* BL_ActionActuator::PyGetEnd(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetEnd(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getEnd()", "the end property"); @@ -507,8 +502,7 @@ const char BL_ActionActuator::GetStart_doc[] = "getStart()\n" "\tReturns the starting frame of the action.\n"; -PyObject* BL_ActionActuator::PyGetStart(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetStart(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getStart()", "the start property"); @@ -525,8 +519,7 @@ const char BL_ActionActuator::GetBlendin_doc[] = "\tReturns the number of interpolation animation frames to be\n" "\tgenerated when this actuator is triggered.\n"; -PyObject* BL_ActionActuator::PyGetBlendin(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetBlendin(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getBlendin()", "the blendin property"); @@ -543,8 +536,7 @@ const char BL_ActionActuator::GetPriority_doc[] = "\tReturns the priority for this actuator. Actuators with lower\n" "\tPriority numbers will override actuators with higher numbers.\n"; -PyObject* BL_ActionActuator::PyGetPriority(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetPriority(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getPriority()", "the priority property"); @@ -565,8 +557,7 @@ const char BL_ActionActuator::SetAction_doc[] = "\t unchanged. If reset is not specified, the timer will" "\t be reset.\n"; -PyObject* BL_ActionActuator::PySetAction(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetAction(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setAction()", "the action property"); @@ -601,8 +592,7 @@ const char BL_ActionActuator::SetStart_doc[] = "setStart(start)\n" "\t - start : Specifies the starting frame of the animation.\n"; -PyObject* BL_ActionActuator::PySetStart(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetStart(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setStart()", "the start property"); @@ -624,8 +614,7 @@ const char BL_ActionActuator::SetEnd_doc[] = "setEnd(end)\n" "\t - end : Specifies the ending frame of the animation.\n"; -PyObject* BL_ActionActuator::PySetEnd(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetEnd(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setEnd()", "the end property"); @@ -648,8 +637,7 @@ const char BL_ActionActuator::SetBlendin_doc[] = "\t - blendin : Specifies the number of frames of animation to generate\n" "\t when making transitions between actions.\n"; -PyObject* BL_ActionActuator::PySetBlendin(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetBlendin(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setBlendin()", "the blendin property"); @@ -673,8 +661,7 @@ const char BL_ActionActuator::SetBlendtime_doc[] = "\t used when generating transitions between actions. This\n" "\t parameter must be in the range from 0.0 to 1.0.\n"; -PyObject* BL_ActionActuator::PySetBlendtime(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetBlendtime(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setBlendtime()", "the blendtime property"); @@ -702,8 +689,7 @@ const char BL_ActionActuator::SetPriority_doc[] = "\t priority numbers will override actuators with higher\n" "\t numbers.\n"; -PyObject* BL_ActionActuator::PySetPriority(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetPriority(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setPriority()", "the priority property"); @@ -725,8 +711,7 @@ const char BL_ActionActuator::SetFrame_doc[] = "setFrame(frame)\n" "\t - frame : Specifies the new current frame for the animation\n"; -PyObject* BL_ActionActuator::PySetFrame(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetFrame(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setFrame()", "the frame property"); @@ -753,8 +738,7 @@ const char BL_ActionActuator::SetProperty_doc[] = "\t - prop : A string specifying the property name to be used in\n" "\t FromProp playback mode.\n"; -PyObject* BL_ActionActuator::PySetProperty(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetProperty(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setProperty()", "the property property"); @@ -776,8 +760,7 @@ const char BL_ActionActuator::SetFrameProperty_doc[] = "setFrameProperty(prop)\n" "\t - prop : A string specifying the property of the frame set up update.\n"; -PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setFrameProperty()", "the frameProperty property"); @@ -795,8 +778,7 @@ PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* self, } /* -PyObject* BL_ActionActuator::PyGetChannel(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetChannel(PyObject* args, PyObject* kwds) { char *string; @@ -816,8 +798,7 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* self, const char BL_ActionActuator::GetType_doc[] = "getType()\n" "\tReturns the operation mode of the actuator.\n"; -PyObject* BL_ActionActuator::PyGetType(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PyGetType(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getType()", "the type property"); @@ -829,8 +810,7 @@ const char BL_ActionActuator::SetType_doc[] = "setType(mode)\n" "\t - mode: Play (0), Flipper (2), LoopStop (3), LoopEnd (4) or Property (6)\n" "\tSet the operation mode of the actuator.\n"; -PyObject* BL_ActionActuator::PySetType(PyObject* self, - PyObject* args, +PyObject* BL_ActionActuator::PySetType(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setType()", "the type property"); @@ -854,13 +834,13 @@ PyObject* BL_ActionActuator::PySetType(PyObject* self, Py_RETURN_NONE; } -PyObject* BL_ActionActuator::PyGetContinue(PyObject* self) { +PyObject* BL_ActionActuator::PyGetContinue() { ShowDeprecationWarning("getContinue()", "the continue property"); return PyInt_FromLong((long)(m_end_reset==0)); } -PyObject* BL_ActionActuator::PySetContinue(PyObject* self, PyObject* value) { +PyObject* BL_ActionActuator::PySetContinue(PyObject* value) { ShowDeprecationWarning("setContinue()", "the continue property"); int param = PyObject_IsTrue( value ); diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp index 783fdd814b7..25a4413a31d 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp +++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp @@ -498,7 +498,7 @@ const char BL_ShapeActionActuator::GetAction_doc[] = "getAction()\n" "\tReturns a string containing the name of the current action.\n"; -PyObject* BL_ShapeActionActuator::PyGetAction(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetAction() { ShowDeprecationWarning("getAction()", "the action property"); if (m_action){ return PyString_FromString(m_action->id.name+2); @@ -511,7 +511,7 @@ const char BL_ShapeActionActuator::GetProperty_doc[] = "getProperty()\n" "\tReturns the name of the property to be used in FromProp mode.\n"; -PyObject* BL_ShapeActionActuator::PyGetProperty(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetProperty() { ShowDeprecationWarning("getProperty()", "the property property"); PyObject *result; @@ -525,7 +525,7 @@ const char BL_ShapeActionActuator::GetFrame_doc[] = "getFrame()\n" "\tReturns the current frame number.\n"; -PyObject* BL_ShapeActionActuator::PyGetFrame(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetFrame() { ShowDeprecationWarning("getFrame()", "the frame property"); PyObject *result; @@ -539,7 +539,7 @@ const char BL_ShapeActionActuator::GetEnd_doc[] = "getEnd()\n" "\tReturns the last frame of the action.\n"; -PyObject* BL_ShapeActionActuator::PyGetEnd(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetEnd() { ShowDeprecationWarning("getEnd()", "the end property"); PyObject *result; @@ -553,7 +553,7 @@ const char BL_ShapeActionActuator::GetStart_doc[] = "getStart()\n" "\tReturns the starting frame of the action.\n"; -PyObject* BL_ShapeActionActuator::PyGetStart(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetStart() { ShowDeprecationWarning("getStart()", "the start property"); PyObject *result; @@ -568,7 +568,7 @@ const char BL_ShapeActionActuator::GetBlendin_doc[] = "\tReturns the number of interpolation animation frames to be\n" "\tgenerated when this actuator is triggered.\n"; -PyObject* BL_ShapeActionActuator::PyGetBlendin(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetBlendin() { ShowDeprecationWarning("getBlendin()", "the blendin property"); PyObject *result; @@ -583,7 +583,7 @@ const char BL_ShapeActionActuator::GetPriority_doc[] = "\tReturns the priority for this actuator. Actuators with lower\n" "\tPriority numbers will override actuators with higher numbers.\n"; -PyObject* BL_ShapeActionActuator::PyGetPriority(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetPriority() { ShowDeprecationWarning("getPriority()", "the priority property"); PyObject *result; @@ -603,9 +603,7 @@ const char BL_ShapeActionActuator::SetAction_doc[] = "\t unchanged. If reset is not specified, the timer will" "\t be reset.\n"; -PyObject* BL_ShapeActionActuator::PySetAction(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetAction(PyObject* args) { ShowDeprecationWarning("setAction()", "the action property"); char *string; int reset = 1; @@ -638,9 +636,7 @@ const char BL_ShapeActionActuator::SetStart_doc[] = "setStart(start)\n" "\t - start : Specifies the starting frame of the animation.\n"; -PyObject* BL_ShapeActionActuator::PySetStart(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetStart(PyObject* args) { ShowDeprecationWarning("setStart()", "the start property"); float start; @@ -660,9 +656,7 @@ const char BL_ShapeActionActuator::SetEnd_doc[] = "setEnd(end)\n" "\t - end : Specifies the ending frame of the animation.\n"; -PyObject* BL_ShapeActionActuator::PySetEnd(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetEnd(PyObject* args) { ShowDeprecationWarning("setEnd()", "the end property"); float end; @@ -683,9 +677,7 @@ const char BL_ShapeActionActuator::SetBlendin_doc[] = "\t - blendin : Specifies the number of frames of animation to generate\n" "\t when making transitions between actions.\n"; -PyObject* BL_ShapeActionActuator::PySetBlendin(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetBlendin(PyObject* args) { ShowDeprecationWarning("setBlendin()", "the blendin property"); float blendin; @@ -707,9 +699,7 @@ const char BL_ShapeActionActuator::SetBlendtime_doc[] = "\t used when generating transitions between actions. This\n" "\t parameter must be in the range from 0.0 to 1.0.\n"; -PyObject* BL_ShapeActionActuator::PySetBlendtime(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetBlendtime(PyObject* args) { ShowDeprecationWarning("setBlendtime()", "the blendTime property"); float blendframe; @@ -735,9 +725,7 @@ const char BL_ShapeActionActuator::SetPriority_doc[] = "\t priority numbers will override actuators with higher\n" "\t numbers.\n"; -PyObject* BL_ShapeActionActuator::PySetPriority(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetPriority(PyObject* args) { ShowDeprecationWarning("setPriority()", "the priority property"); int priority; @@ -757,7 +745,7 @@ const char BL_ShapeActionActuator::GetFrameProperty_doc[] = "getFrameProperty()\n" "\tReturns the name of the property, that is set to the current frame number.\n"; -PyObject* BL_ShapeActionActuator::PyGetFrameProperty(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetFrameProperty() { ShowDeprecationWarning("getFrameProperty()", "the frameProperty property"); PyObject *result; @@ -772,9 +760,7 @@ const char BL_ShapeActionActuator::SetFrame_doc[] = "setFrame(frame)\n" "\t - frame : Specifies the new current frame for the animation\n"; -PyObject* BL_ShapeActionActuator::PySetFrame(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetFrame(PyObject* args) { ShowDeprecationWarning("setFrame()", "the frame property"); float frame; @@ -799,9 +785,7 @@ const char BL_ShapeActionActuator::SetProperty_doc[] = "\t - prop : A string specifying the property name to be used in\n" "\t FromProp playback mode.\n"; -PyObject* BL_ShapeActionActuator::PySetProperty(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetProperty(PyObject* args) { ShowDeprecationWarning("setProperty()", "the property property"); char *string; @@ -821,9 +805,7 @@ const char BL_ShapeActionActuator::SetFrameProperty_doc[] = "setFrameProperty(prop)\n" "\t - prop : A string specifying the property of the frame set up update.\n"; -PyObject* BL_ShapeActionActuator::PySetFrameProperty(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetFrameProperty(PyObject* args) { ShowDeprecationWarning("setFrameProperty()", "the frameProperty property"); char *string; @@ -842,7 +824,7 @@ PyObject* BL_ShapeActionActuator::PySetFrameProperty(PyObject* self, const char BL_ShapeActionActuator::GetType_doc[] = "getType()\n" "\tReturns the operation mode of the actuator.\n"; -PyObject* BL_ShapeActionActuator::PyGetType(PyObject* self) { +PyObject* BL_ShapeActionActuator::PyGetType() { ShowDeprecationWarning("getType()", "the type property"); return Py_BuildValue("h", m_playtype); } @@ -852,9 +834,7 @@ const char BL_ShapeActionActuator::SetType_doc[] = "setType(mode)\n" "\t - mode: Play (0), Flipper (2), LoopStop (3), LoopEnd (4) or Property (6)\n" "\tSet the operation mode of the actuator.\n"; -PyObject* BL_ShapeActionActuator::PySetType(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* BL_ShapeActionActuator::PySetType(PyObject* args) { ShowDeprecationWarning("setType()", "the type property"); short typeArg; diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h index 162580fca85..716d8c9995b 100644 --- a/source/gameengine/Converter/BL_ShapeActionActuator.h +++ b/source/gameengine/Converter/BL_ShapeActionActuator.h @@ -83,16 +83,16 @@ public: bAction* GetAction() { return m_action; } void SetAction(bAction* act) { m_action= act; } - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetAction); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetBlendin); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetPriority); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetStart); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetEnd); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetFrame); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetProperty); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetFrameProperty); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetBlendtime); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetChannel); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetAction); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetBlendin); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetPriority); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetStart); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetEnd); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetFrame); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetProperty); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetFrameProperty); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetBlendtime); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetChannel); KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetAction); KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetBlendin); @@ -104,7 +104,7 @@ public: KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetFrameProperty); // KX_PYMETHOD(BL_ActionActuator,GetChannel); KX_PYMETHOD_DOC_NOARGS(BL_ShapeActionActuator,GetType); - KX_PYMETHOD_DOC(BL_ShapeActionActuator,SetType); + KX_PYMETHOD_DOC_VARARGS(BL_ShapeActionActuator,SetType); virtual PyObject* py_getattro(PyObject* attr); virtual int py_setattro(PyObject* attr, PyObject* value); diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp index 4e14ce35eb9..5c7e6a4383e 100644 --- a/source/gameengine/Expressions/ListValue.cpp +++ b/source/gameengine/Expressions/ListValue.cpp @@ -438,14 +438,14 @@ void CListValue::MergeList(CListValue *otherlist) -PyObject* CListValue::Pyappend(PyObject* self, PyObject* value) +PyObject* CListValue::Pyappend(PyObject* value) { - return listvalue_buffer_concat(self, value); + return listvalue_buffer_concat(m_proxy, value); /* m_proxy is the same as self */ } -PyObject* CListValue::Pyreverse(PyObject* self) +PyObject* CListValue::Pyreverse() { std::reverse(m_pValueArray.begin(),m_pValueArray.end()); Py_RETURN_NONE; @@ -474,7 +474,7 @@ bool CListValue::CheckEqual(CValue* first,CValue* second) -PyObject* CListValue::Pyindex(PyObject* self, PyObject *value) +PyObject* CListValue::Pyindex(PyObject *value) { PyObject* result = NULL; @@ -503,7 +503,7 @@ PyObject* CListValue::Pyindex(PyObject* self, PyObject *value) -PyObject* CListValue::Pycount(PyObject* self, PyObject* value) +PyObject* CListValue::Pycount(PyObject* value) { int numfound = 0; @@ -530,7 +530,7 @@ PyObject* CListValue::Pycount(PyObject* self, PyObject* value) -PyObject* CListValue::Pyfrom_id(PyObject* self, PyObject* value) +PyObject* CListValue::Pyfrom_id(PyObject* value) { uintptr_t id= (uintptr_t)PyLong_AsVoidPtr(value); diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index 3c414c6b16d..da761bd22cb 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -780,7 +780,7 @@ bool PyObjectPlus::isA(const char *mytypename) // check typename of each parent return false; } -PyObject *PyObjectPlus::PyisA(PyObject *self, PyObject *value) // Python wrapper for isA +PyObject *PyObjectPlus::PyisA(PyObject *value) // Python wrapper for isA { if (PyType_Check(value)) { return PyBool_FromLong(isA((PyTypeObject *)value)); diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h index 9f30e6570ee..370717a919b 100644 --- a/source/gameengine/Expressions/PyObjectPlus.h +++ b/source/gameengine/Expressions/PyObjectPlus.h @@ -180,62 +180,54 @@ typedef struct { * macro is one that also requires a documentation string */ #define KX_PYMETHOD(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self, PyObject* args, PyObject* kwds); \ + PyObject* Py##method_name(PyObject* args, PyObject* kwds); \ static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \ - PyObjectPlus *self_plus= BGE_PROXY_REF(self); \ - return ((class_name*)self_plus)->Py##method_name(self, args, kwds); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args, kwds); \ }; \ #define KX_PYMETHOD_VARARGS(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self, PyObject* args); \ + PyObject* Py##method_name(PyObject* args); \ static PyObject* sPy##method_name( PyObject* self, PyObject* args) { \ - PyObjectPlus *self_plus= BGE_PROXY_REF(self); \ - return ((class_name*)self_plus)->Py##method_name(self, args); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args); \ }; \ #define KX_PYMETHOD_NOARGS(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self); \ + PyObject* Py##method_name(); \ static PyObject* sPy##method_name( PyObject* self) { \ - PyObjectPlus *self_plus= BGE_PROXY_REF(self); \ - return ((class_name*)self_plus)->Py##method_name(self); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(); \ }; \ #define KX_PYMETHOD_O(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self, PyObject* value); \ + PyObject* Py##method_name(PyObject* value); \ static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \ - PyObjectPlus *self_plus= ((PyObjectPlus_Proxy *)self)->ref; \ - return ((class_name*) self_plus)->Py##method_name(self, value); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(value); \ }; \ #define KX_PYMETHOD_DOC(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self, PyObject* args, PyObject* kwds); \ + PyObject* Py##method_name(PyObject* args, PyObject* kwds); \ static PyObject* sPy##method_name( PyObject* self, PyObject* args, PyObject* kwds) { \ - PyObjectPlus *self_plus= BGE_PROXY_REF(self); \ - return ((class_name*)self_plus)->Py##method_name(self, args, kwds); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args, kwds); \ }; \ static const char method_name##_doc[]; \ #define KX_PYMETHOD_DOC_VARARGS(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self, PyObject* args); \ + PyObject* Py##method_name(PyObject* args); \ static PyObject* sPy##method_name( PyObject* self, PyObject* args) { \ - PyObjectPlus *self_plus= BGE_PROXY_REF(self); \ - return ((class_name*)self_plus)->Py##method_name(self, args); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args); \ }; \ static const char method_name##_doc[]; \ #define KX_PYMETHOD_DOC_O(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self, PyObject* value); \ + PyObject* Py##method_name(PyObject* value); \ static PyObject* sPy##method_name( PyObject* self, PyObject* value) { \ - PyObjectPlus *self_plus= BGE_PROXY_REF(self); \ - return ((class_name*)self_plus)->Py##method_name(self, value); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(value); \ }; \ static const char method_name##_doc[]; \ #define KX_PYMETHOD_DOC_NOARGS(class_name, method_name) \ - PyObject* Py##method_name(PyObject* self); \ + PyObject* Py##method_name(); \ static PyObject* sPy##method_name( PyObject* self) { \ - PyObjectPlus *self_plus= BGE_PROXY_REF(self); \ - return ((class_name*)self_plus)->Py##method_name(self); \ + return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(); \ }; \ static const char method_name##_doc[]; \ @@ -258,19 +250,19 @@ typedef struct { */ #define KX_PYMETHODDEF_DOC(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name(PyObject* self, PyObject* args, PyObject*) +PyObject* class_name::Py##method_name(PyObject* args, PyObject*) #define KX_PYMETHODDEF_DOC_VARARGS(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name(PyObject* self, PyObject* args) +PyObject* class_name::Py##method_name(PyObject* args) #define KX_PYMETHODDEF_DOC_O(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name(PyObject* self, PyObject* value) +PyObject* class_name::Py##method_name(PyObject* value) #define KX_PYMETHODDEF_DOC_NOARGS(class_name, method_name, doc_string) \ const char class_name::method_name##_doc[] = doc_string; \ -PyObject* class_name::Py##method_name(PyObject* self) +PyObject* class_name::Py##method_name() /** * Attribute management @@ -453,8 +445,6 @@ public: * which we cant use because we have our own subclass system */ bool isA(PyTypeObject *T); bool isA(const char *mytypename); - PyObject *PyisA(PyObject *value); - //static PyObject *sPy_isA(PyObject *self, PyObject *value); KX_PYMETHOD_O(PyObjectPlus,isA); diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp index 17813d0ab52..ca46d782992 100644 --- a/source/gameengine/Expressions/Value.cpp +++ b/source/gameengine/Expressions/Value.cpp @@ -67,7 +67,7 @@ PyMethodDef CValue::Methods[] = { {NULL,NULL} //Sentinel }; -PyObject* CValue::PyGetName(PyObject* self) +PyObject* CValue::PyGetName() { return PyString_FromString(this->GetName()); } @@ -797,7 +797,7 @@ void CValue::ShowDeprecationWarning(const char* old_way,const char* new_way) PyObject *getframe, *frame; PyObject *f_lineno, *f_code, *co_filename; - getframe = PySys_GetObject("_getframe"); // borrowed + getframe = PySys_GetObject((char *)"_getframe"); // borrowed if (getframe) { frame = PyObject_CallObject(getframe, NULL); if (frame) { diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp index c51555a02b4..acd906ef9dd 100644 --- a/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp +++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp @@ -185,7 +185,7 @@ int SCA_ActuatorSensor::CheckActuator(void *self, const PyAttributeDef*) const char SCA_ActuatorSensor::GetActuator_doc[] = "getActuator()\n" "\tReturn the Actuator with which the sensor operates.\n"; -PyObject* SCA_ActuatorSensor::PyGetActuator(PyObject* self) +PyObject* SCA_ActuatorSensor::PyGetActuator() { ShowDeprecationWarning("getActuator()", "the actuator property"); return PyString_FromString(m_checkactname); @@ -197,7 +197,7 @@ const char SCA_ActuatorSensor::SetActuator_doc[] = "\t- name: string\n" "\tSets the Actuator with which to operate. If there is no Actuator\n" "\tof this name, the call is ignored.\n"; -PyObject* SCA_ActuatorSensor::PySetActuator(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_ActuatorSensor::PySetActuator(PyObject* args) { ShowDeprecationWarning("setActuator()", "the actuator property"); /* We should query whether the name exists. Or should we create a prop */ diff --git a/source/gameengine/GameLogic/SCA_ActuatorSensor.h b/source/gameengine/GameLogic/SCA_ActuatorSensor.h index 9bc873e4ee1..21960993497 100644 --- a/source/gameengine/GameLogic/SCA_ActuatorSensor.h +++ b/source/gameengine/GameLogic/SCA_ActuatorSensor.h @@ -65,7 +65,7 @@ public: virtual int py_setattro(PyObject *attr, PyObject *value); /* 3. setProperty */ - KX_PYMETHOD_DOC(SCA_ActuatorSensor,SetActuator); + KX_PYMETHOD_DOC_VARARGS(SCA_ActuatorSensor,SetActuator); /* 4. getProperty */ KX_PYMETHOD_DOC_NOARGS(SCA_ActuatorSensor,GetActuator); diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.cpp b/source/gameengine/GameLogic/SCA_DelaySensor.cpp index dad85a435c8..44a0175d916 100644 --- a/source/gameengine/GameLogic/SCA_DelaySensor.cpp +++ b/source/gameengine/GameLogic/SCA_DelaySensor.cpp @@ -192,7 +192,7 @@ const char SCA_DelaySensor::SetDelay_doc[] = "\t- delay: length of the initial OFF period as number of frame\n" "\t 0 for immediate trigger\n" "\tSet the initial delay before the positive trigger\n"; -PyObject* SCA_DelaySensor::PySetDelay(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_DelaySensor::PySetDelay(PyObject* args) { ShowDeprecationWarning("setDelay()", "the delay property"); int delay; @@ -214,7 +214,7 @@ const char SCA_DelaySensor::SetDuration_doc[] = "\t 0 for no ON period\n" "\tSet the duration of the ON pulse after initial delay.\n" "\tIf > 0, a negative trigger is fired at the end of the ON pulse.\n"; -PyObject* SCA_DelaySensor::PySetDuration(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_DelaySensor::PySetDuration(PyObject* args) { ShowDeprecationWarning("setDuration()", "the duration property"); int duration; @@ -235,7 +235,7 @@ const char SCA_DelaySensor::SetRepeat_doc[] = "\t- repeat: 1 if the initial OFF-ON cycle should be repeated indefinately\n" "\t 0 if the initial OFF-ON cycle should run only once\n" "\tSet the sensor repeat mode\n"; -PyObject* SCA_DelaySensor::PySetRepeat(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_DelaySensor::PySetRepeat(PyObject* args) { ShowDeprecationWarning("setRepeat()", "the repeat property"); int repeat; @@ -250,7 +250,7 @@ PyObject* SCA_DelaySensor::PySetRepeat(PyObject* self, PyObject* args, PyObject* const char SCA_DelaySensor::GetDelay_doc[] = "getDelay()\n" "\tReturn the delay parameter value\n"; -PyObject* SCA_DelaySensor::PyGetDelay(PyObject* self) +PyObject* SCA_DelaySensor::PyGetDelay() { ShowDeprecationWarning("getDelay()", "the delay property"); return PyInt_FromLong(m_delay); @@ -259,7 +259,7 @@ PyObject* SCA_DelaySensor::PyGetDelay(PyObject* self) const char SCA_DelaySensor::GetDuration_doc[] = "getDuration()\n" "\tReturn the duration parameter value\n"; -PyObject* SCA_DelaySensor::PyGetDuration(PyObject* self) +PyObject* SCA_DelaySensor::PyGetDuration() { ShowDeprecationWarning("getDuration()", "the duration property"); return PyInt_FromLong(m_duration); @@ -268,7 +268,7 @@ PyObject* SCA_DelaySensor::PyGetDuration(PyObject* self) const char SCA_DelaySensor::GetRepeat_doc[] = "getRepeat()\n" "\tReturn the repeat parameter value\n"; -PyObject* SCA_DelaySensor::PyGetRepeat(PyObject* self) +PyObject* SCA_DelaySensor::PyGetRepeat() { ShowDeprecationWarning("getRepeat()", "the repeat property"); return BoolToPyArg(m_repeat); diff --git a/source/gameengine/GameLogic/SCA_DelaySensor.h b/source/gameengine/GameLogic/SCA_DelaySensor.h index f9e3d619198..8da76ff7189 100644 --- a/source/gameengine/GameLogic/SCA_DelaySensor.h +++ b/source/gameengine/GameLogic/SCA_DelaySensor.h @@ -64,9 +64,9 @@ public: virtual int py_setattro(PyObject *attr, PyObject *value); /* setProperty */ - KX_PYMETHOD_DOC(SCA_DelaySensor,SetDelay); - KX_PYMETHOD_DOC(SCA_DelaySensor,SetDuration); - KX_PYMETHOD_DOC(SCA_DelaySensor,SetRepeat); + KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetDelay); + KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetDuration); + KX_PYMETHOD_DOC_VARARGS(SCA_DelaySensor,SetRepeat); /* getProperty */ KX_PYMETHOD_DOC_NOARGS(SCA_DelaySensor,GetDelay); KX_PYMETHOD_DOC_NOARGS(SCA_DelaySensor,GetDuration); diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp index 1ae78321959..b3045402c2c 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.cpp +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.cpp @@ -289,7 +289,7 @@ int SCA_ILogicBrick::py_setattro(PyObject *attr, PyObject *value) } -PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self) +PyObject* SCA_ILogicBrick::PyGetOwner() { CValue* parent = GetParent(); if (parent) @@ -303,9 +303,7 @@ PyObject* SCA_ILogicBrick::PyGetOwner(PyObject* self) -PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* self, - PyObject* args, - PyObject* kwds) +PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* args) { ShowDeprecationWarning("setExecutePriority()", "the executePriority property"); @@ -322,7 +320,7 @@ PyObject* SCA_ILogicBrick::PySetExecutePriority(PyObject* self, -PyObject* SCA_ILogicBrick::PyGetExecutePriority(PyObject* self) +PyObject* SCA_ILogicBrick::PyGetExecutePriority() { ShowDeprecationWarning("getExecutePriority()", "the executePriority property"); return PyInt_FromLong(m_Execute_Ueber_Priority); diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h index 20fa3c2d687..c0ff0fd633f 100644 --- a/source/gameengine/GameLogic/SCA_ILogicBrick.h +++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h @@ -88,7 +88,7 @@ public: // python methods KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetOwner); - KX_PYMETHOD(SCA_ILogicBrick,SetExecutePriority); + KX_PYMETHOD_VARARGS(SCA_ILogicBrick,SetExecutePriority); KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetExecutePriority); // check that attribute is a property diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp index 269038db4f9..68f5653d53a 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.cpp +++ b/source/gameengine/GameLogic/SCA_ISensor.cpp @@ -218,7 +218,7 @@ void SCA_ISensor::Activate(class SCA_LogicManager* logicmgr, CValue* event) const char SCA_ISensor::IsPositive_doc[] = "isPositive()\n" "\tReturns whether the sensor is in an active state.\n"; -PyObject* SCA_ISensor::PyIsPositive(PyObject* self) +PyObject* SCA_ISensor::PyIsPositive() { ShowDeprecationWarning("isPositive()", "the read-only positive property"); int retval = IsPositiveTrigger(); @@ -228,7 +228,7 @@ PyObject* SCA_ISensor::PyIsPositive(PyObject* self) const char SCA_ISensor::IsTriggered_doc[] = "isTriggered()\n" "\tReturns whether the sensor has triggered the current controller.\n"; -PyObject* SCA_ISensor::PyIsTriggered(PyObject* self) +PyObject* SCA_ISensor::PyIsTriggered() { ShowDeprecationWarning("isTriggered()", "the read-only triggered property"); // check with the current controller @@ -244,7 +244,7 @@ PyObject* SCA_ISensor::PyIsTriggered(PyObject* self) const char SCA_ISensor::GetUsePosPulseMode_doc[] = "getUsePosPulseMode()\n" "\tReturns whether positive pulse mode is active.\n"; -PyObject* SCA_ISensor::PyGetUsePosPulseMode(PyObject* self) +PyObject* SCA_ISensor::PyGetUsePosPulseMode() { ShowDeprecationWarning("getUsePosPulseMode()", "the usePosPulseMode property"); return BoolToPyArg(m_pos_pulsemode); @@ -258,7 +258,7 @@ const char SCA_ISensor::SetUsePosPulseMode_doc[] = "\t - pulse? : Pulse when a positive event occurs?\n" "\t (KX_TRUE, KX_FALSE)\n" "\tSet whether to do pulsing when positive pulses occur.\n"; -PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* args) { ShowDeprecationWarning("setUsePosPulseMode()", "the usePosPulseMode property"); int pyarg = 0; @@ -273,7 +273,7 @@ PyObject* SCA_ISensor::PySetUsePosPulseMode(PyObject* self, PyObject* args, PyOb const char SCA_ISensor::GetFrequency_doc[] = "getFrequency()\n" "\tReturns the frequency of the updates in pulse mode.\n" ; -PyObject* SCA_ISensor::PyGetFrequency(PyObject* self) +PyObject* SCA_ISensor::PyGetFrequency() { ShowDeprecationWarning("getFrequency()", "the frequency property"); return PyInt_FromLong(m_pulse_frequency); @@ -287,7 +287,7 @@ const char SCA_ISensor::SetFrequency_doc[] = "\t- pulse_frequency: The frequency of the updates in pulse mode (integer)" "\tSet the frequency of the updates in pulse mode.\n" "\tIf the frequency is negative, it is set to 0.\n" ; -PyObject* SCA_ISensor::PySetFrequency(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_ISensor::PySetFrequency(PyObject* args) { ShowDeprecationWarning("setFrequency()", "the frequency property"); int pulse_frequencyArg = 0; @@ -310,7 +310,7 @@ PyObject* SCA_ISensor::PySetFrequency(PyObject* self, PyObject* args, PyObject* const char SCA_ISensor::GetInvert_doc[] = "getInvert()\n" "\tReturns whether or not pulses from this sensor are inverted.\n" ; -PyObject* SCA_ISensor::PyGetInvert(PyObject* self) +PyObject* SCA_ISensor::PyGetInvert() { ShowDeprecationWarning("getInvert()", "the invert property"); return BoolToPyArg(m_invert); @@ -320,7 +320,7 @@ const char SCA_ISensor::SetInvert_doc[] = "setInvert(invert?)\n" "\t- invert?: Invert the event-values? (KX_TRUE, KX_FALSE)\n" "\tSet whether to invert pulses.\n"; -PyObject* SCA_ISensor::PySetInvert(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_ISensor::PySetInvert(PyObject* args) { ShowDeprecationWarning("setInvert()", "the invert property"); int pyarg = 0; @@ -336,7 +336,7 @@ const char SCA_ISensor::GetLevel_doc[] = "\tA level detector will immediately generate a pulse, negative or positive\n" "\tdepending on the sensor condition, as soon as the state is activated.\n" "\tA edge detector will wait for a state change before generating a pulse.\n"; -PyObject* SCA_ISensor::PyGetLevel(PyObject* self) +PyObject* SCA_ISensor::PyGetLevel() { ShowDeprecationWarning("getLevel()", "the level property"); return BoolToPyArg(m_level); @@ -346,7 +346,7 @@ const char SCA_ISensor::SetLevel_doc[] = "setLevel(level?)\n" "\t- level?: Detect level instead of edge? (KX_TRUE, KX_FALSE)\n" "\tSet whether to detect level or edge transition when entering a state.\n"; -PyObject* SCA_ISensor::PySetLevel(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_ISensor::PySetLevel(PyObject* args) { ShowDeprecationWarning("setLevel()", "the level property"); int pyarg = 0; @@ -358,7 +358,7 @@ PyObject* SCA_ISensor::PySetLevel(PyObject* self, PyObject* args, PyObject* kwds const char SCA_ISensor::GetUseNegPulseMode_doc[] = "getUseNegPulseMode()\n" "\tReturns whether negative pulse mode is active.\n"; -PyObject* SCA_ISensor::PyGetUseNegPulseMode(PyObject* self) +PyObject* SCA_ISensor::PyGetUseNegPulseMode() { ShowDeprecationWarning("getUseNegPulseMode()", "the useNegPulseMode property"); return BoolToPyArg(m_neg_pulsemode); @@ -369,7 +369,7 @@ const char SCA_ISensor::SetUseNegPulseMode_doc[] = "\t - pulse? : Pulse when a negative event occurs?\n" "\t (KX_TRUE, KX_FALSE)\n" "\tSet whether to do pulsing when negative pulses occur.\n"; -PyObject* SCA_ISensor::PySetUseNegPulseMode(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_ISensor::PySetUseNegPulseMode(PyObject* args) { ShowDeprecationWarning("setUseNegPulseMode()", "the useNegPulseMode property"); int pyarg = 0; diff --git a/source/gameengine/GameLogic/SCA_ISensor.h b/source/gameengine/GameLogic/SCA_ISensor.h index 18d630fce0e..6b1c8cca104 100644 --- a/source/gameengine/GameLogic/SCA_ISensor.h +++ b/source/gameengine/GameLogic/SCA_ISensor.h @@ -143,15 +143,15 @@ public: KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,IsPositive); KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,IsTriggered); KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetUsePosPulseMode); - KX_PYMETHOD_DOC(SCA_ISensor,SetUsePosPulseMode); + KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetUsePosPulseMode); KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetFrequency); - KX_PYMETHOD_DOC(SCA_ISensor,SetFrequency); + KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetFrequency); KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetUseNegPulseMode); - KX_PYMETHOD_DOC(SCA_ISensor,SetUseNegPulseMode); + KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetUseNegPulseMode); KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetInvert); - KX_PYMETHOD_DOC(SCA_ISensor,SetInvert); + KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetInvert); KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,GetLevel); - KX_PYMETHOD_DOC(SCA_ISensor,SetLevel); + KX_PYMETHOD_DOC_VARARGS(SCA_ISensor,SetLevel); //<------ KX_PYMETHOD_DOC_NOARGS(SCA_ISensor,reset); diff --git a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp index 087fb036fae..28ff1c82924 100644 --- a/source/gameengine/GameLogic/SCA_JoystickSensor.cpp +++ b/source/gameengine/GameLogic/SCA_JoystickSensor.cpp @@ -349,7 +349,7 @@ int SCA_JoystickSensor::py_setattro(PyObject *attr, PyObject *value) const char SCA_JoystickSensor::GetIndex_doc[] = "getIndex\n" "\tReturns the joystick index to use.\n"; -PyObject* SCA_JoystickSensor::PyGetIndex( PyObject* self ) { +PyObject* SCA_JoystickSensor::PyGetIndex( ) { ShowDeprecationWarning("getIndex()", "the index property"); return PyInt_FromLong(m_joyindex); } @@ -359,7 +359,7 @@ PyObject* SCA_JoystickSensor::PyGetIndex( PyObject* self ) { const char SCA_JoystickSensor::SetIndex_doc[] = "setIndex\n" "\tSets the joystick index to use.\n"; -PyObject* SCA_JoystickSensor::PySetIndex( PyObject* self, PyObject* value ) { +PyObject* SCA_JoystickSensor::PySetIndex( PyObject* value ) { ShowDeprecationWarning("setIndex()", "the index property"); int index = PyInt_AsLong( value ); /* -1 on error, will raise an error in this case */ if (index < 0 || index >= JOYINDEX_MAX) { @@ -375,7 +375,7 @@ PyObject* SCA_JoystickSensor::PySetIndex( PyObject* self, PyObject* value ) { const char SCA_JoystickSensor::GetAxis_doc[] = "getAxis\n" "\tReturns the current axis this sensor reacts to.\n"; -PyObject* SCA_JoystickSensor::PyGetAxis( PyObject* self) { +PyObject* SCA_JoystickSensor::PyGetAxis( ) { ShowDeprecationWarning("getAxis()", "the axis property"); return Py_BuildValue("[ii]",m_axis, m_axisf); } @@ -385,7 +385,7 @@ PyObject* SCA_JoystickSensor::PyGetAxis( PyObject* self) { const char SCA_JoystickSensor::SetAxis_doc[] = "setAxis\n" "\tSets the current axis this sensor reacts to.\n"; -PyObject* SCA_JoystickSensor::PySetAxis( PyObject* self, PyObject* args ) { +PyObject* SCA_JoystickSensor::PySetAxis( PyObject* args ) { ShowDeprecationWarning("setAxis()", "the axis property"); int axis,axisflag; @@ -402,7 +402,7 @@ PyObject* SCA_JoystickSensor::PySetAxis( PyObject* self, PyObject* args ) { const char SCA_JoystickSensor::GetAxisValue_doc[] = "getAxisValue\n" "\tReturns a list of the values for the current state of each axis.\n"; -PyObject* SCA_JoystickSensor::PyGetAxisValue( PyObject* self) { +PyObject* SCA_JoystickSensor::PyGetAxisValue( ) { ShowDeprecationWarning("getAxisValue()", "the axisPosition property"); SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex); @@ -421,7 +421,7 @@ PyObject* SCA_JoystickSensor::PyGetAxisValue( PyObject* self) { const char SCA_JoystickSensor::GetThreshold_doc[] = "getThreshold\n" "\tReturns the threshold of the axis.\n"; -PyObject* SCA_JoystickSensor::PyGetThreshold( PyObject* self) { +PyObject* SCA_JoystickSensor::PyGetThreshold( ) { ShowDeprecationWarning("getThreshold()", "the threshold property"); return PyInt_FromLong(m_precision); } @@ -431,7 +431,7 @@ PyObject* SCA_JoystickSensor::PyGetThreshold( PyObject* self) { const char SCA_JoystickSensor::SetThreshold_doc[] = "setThreshold\n" "\tSets the threshold of the axis.\n"; -PyObject* SCA_JoystickSensor::PySetThreshold( PyObject* self, PyObject* args ) { +PyObject* SCA_JoystickSensor::PySetThreshold( PyObject* args ) { ShowDeprecationWarning("setThreshold()", "the threshold property"); int thresh; if(!PyArg_ParseTuple(args, "i:setThreshold", &thresh)){ @@ -445,7 +445,7 @@ PyObject* SCA_JoystickSensor::PySetThreshold( PyObject* self, PyObject* args ) { const char SCA_JoystickSensor::GetButton_doc[] = "getButton\n" "\tReturns the current button this sensor is checking.\n"; -PyObject* SCA_JoystickSensor::PyGetButton( PyObject* self) { +PyObject* SCA_JoystickSensor::PyGetButton( ) { ShowDeprecationWarning("getButton()", "the button property"); return PyInt_FromLong(m_button); } @@ -454,7 +454,7 @@ PyObject* SCA_JoystickSensor::PyGetButton( PyObject* self) { const char SCA_JoystickSensor::SetButton_doc[] = "setButton\n" "\tSets the button the sensor reacts to.\n"; -PyObject* SCA_JoystickSensor::PySetButton( PyObject* self, PyObject* value ) { +PyObject* SCA_JoystickSensor::PySetButton( PyObject* value ) { ShowDeprecationWarning("setButton()", "the button property"); int button = PyInt_AsLong(value); if(button==-1 && PyErr_Occurred()) { @@ -469,16 +469,16 @@ PyObject* SCA_JoystickSensor::PySetButton( PyObject* self, PyObject* value ) { const char SCA_JoystickSensor::GetButtonValue_doc[] = "getButtonValue\n" "\tReturns a list containing the indicies of the current pressed state of each button.\n"; -PyObject* SCA_JoystickSensor::PyGetButtonValue( PyObject* self) { +PyObject* SCA_JoystickSensor::PyGetButtonValue( ) { ShowDeprecationWarning("getButtonValue()", "getButtonActiveList"); - return PyGetButtonActiveList(self); + return PyGetButtonActiveList( ); } /* get button active list -------------------------------------------------- */ const char SCA_JoystickSensor::GetButtonActiveList_doc[] = "getButtonActiveList\n" "\tReturns a list containing the indicies of the button currently pressed.\n"; -PyObject* SCA_JoystickSensor::PyGetButtonActiveList( PyObject* self) { +PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) { SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex); PyObject *ls = PyList_New(0); PyObject *value; @@ -500,7 +500,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonActiveList( PyObject* self) { const char SCA_JoystickSensor::GetButtonStatus_doc[] = "getButtonStatus(buttonIndex)\n" "\tReturns a bool of the current pressed state of the specified button.\n"; -PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* self, PyObject* args ) { +PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) { SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex); int index; @@ -517,7 +517,7 @@ PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* self, PyObject* args const char SCA_JoystickSensor::GetHat_doc[] = "getHat\n" "\tReturns the current direction of the hat.\n"; -PyObject* SCA_JoystickSensor::PyGetHat( PyObject* self ) { +PyObject* SCA_JoystickSensor::PyGetHat( ) { ShowDeprecationWarning("getHat()", "the hat property"); return Py_BuildValue("[ii]",m_hat, m_hatf); } @@ -527,7 +527,7 @@ PyObject* SCA_JoystickSensor::PyGetHat( PyObject* self ) { const char SCA_JoystickSensor::SetHat_doc[] = "setHat\n" "\tSets the hat the sensor reacts to.\n"; -PyObject* SCA_JoystickSensor::PySetHat( PyObject* self, PyObject* args ) { +PyObject* SCA_JoystickSensor::PySetHat( PyObject* args ) { ShowDeprecationWarning("setHat()", "the hat property"); int hat,hatflag; if(!PyArg_ParseTuple(args, "ii:setHat", &hat, &hatflag)){ @@ -543,7 +543,7 @@ PyObject* SCA_JoystickSensor::PySetHat( PyObject* self, PyObject* args ) { const char SCA_JoystickSensor::NumberOfAxes_doc[] = "getNumAxes\n" "\tReturns the number of axes .\n"; -PyObject* SCA_JoystickSensor::PyNumberOfAxes( PyObject* self ) { +PyObject* SCA_JoystickSensor::PyNumberOfAxes( ) { ShowDeprecationWarning("getNumAxes()", "the numAxis property"); SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex); // when the joystick is null their is 0 exis still. dumb but scripters should use isConnected() @@ -554,7 +554,7 @@ PyObject* SCA_JoystickSensor::PyNumberOfAxes( PyObject* self ) { const char SCA_JoystickSensor::NumberOfButtons_doc[] = "getNumButtons\n" "\tReturns the number of buttons .\n"; -PyObject* SCA_JoystickSensor::PyNumberOfButtons( PyObject* self ) { +PyObject* SCA_JoystickSensor::PyNumberOfButtons( ) { ShowDeprecationWarning("getNumButtons()", "the numButtons property"); SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex); return PyInt_FromLong( joy ? joy->GetNumberOfButtons() : 0 ); @@ -564,7 +564,7 @@ PyObject* SCA_JoystickSensor::PyNumberOfButtons( PyObject* self ) { const char SCA_JoystickSensor::NumberOfHats_doc[] = "getNumHats\n" "\tReturns the number of hats .\n"; -PyObject* SCA_JoystickSensor::PyNumberOfHats( PyObject* self ) { +PyObject* SCA_JoystickSensor::PyNumberOfHats( ) { ShowDeprecationWarning("getNumHats()", "the numHats property"); SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex); return PyInt_FromLong( joy ? joy->GetNumberOfHats() : 0 ); @@ -573,7 +573,7 @@ PyObject* SCA_JoystickSensor::PyNumberOfHats( PyObject* self ) { const char SCA_JoystickSensor::Connected_doc[] = "getConnected\n" "\tReturns True if a joystick is connected at this joysticks index.\n"; -PyObject* SCA_JoystickSensor::PyConnected( PyObject* self ) { +PyObject* SCA_JoystickSensor::PyConnected( ) { ShowDeprecationWarning("getConnected()", "the connected property"); SCA_Joystick *joy = m_pJoystickMgr->GetJoystickDevice(m_joyindex); return PyBool_FromLong( joy ? joy->Connected() : 0 ); diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp index 3e19c880c4d..d56e5fe29dc 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp @@ -412,7 +412,7 @@ void SCA_KeyboardSensor::LogKeystrokes(void) const char SCA_KeyboardSensor::GetKey_doc[] = "getKey()\n" "\tReturn the code of the key this sensor is listening to.\n" ; -PyObject* SCA_KeyboardSensor::PyGetKey(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PyGetKey() { ShowDeprecationWarning("getKey()", "the key property"); return PyInt_FromLong(m_hotkey); @@ -423,7 +423,7 @@ const char SCA_KeyboardSensor::SetKey_doc[] = "setKey(keycode)\n" "\t- keycode: any code from GameKeys\n" "\tSet the key this sensor should listen to.\n" ; -PyObject* SCA_KeyboardSensor::PySetKey(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PySetKey(PyObject* args) { ShowDeprecationWarning("setKey()", "the key property"); int keyCode; @@ -444,7 +444,7 @@ const char SCA_KeyboardSensor::GetHold1_doc[] = "getHold1()\n" "\tReturn the code of the first key modifier to the key this \n" "\tsensor is listening to.\n" ; -PyObject* SCA_KeyboardSensor::PyGetHold1(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PyGetHold1() { ShowDeprecationWarning("getHold1()", "the hold1 property"); return PyInt_FromLong(m_qual); @@ -455,7 +455,7 @@ const char SCA_KeyboardSensor::SetHold1_doc[] = "setHold1(keycode)\n" "\t- keycode: any code from GameKeys\n" "\tSet the first modifier to the key this sensor should listen to.\n" ; -PyObject* SCA_KeyboardSensor::PySetHold1(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PySetHold1(PyObject* args) { ShowDeprecationWarning("setHold1()", "the hold1 property"); int keyCode; @@ -476,7 +476,7 @@ const char SCA_KeyboardSensor::GetHold2_doc[] = "getHold2()\n" "\tReturn the code of the second key modifier to the key this \n" "\tsensor is listening to.\n" ; -PyObject* SCA_KeyboardSensor::PyGetHold2(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PyGetHold2() { ShowDeprecationWarning("getHold2()", "the hold2 property"); return PyInt_FromLong(m_qual2); @@ -487,7 +487,7 @@ const char SCA_KeyboardSensor::SetHold2_doc[] = "setHold2(keycode)\n" "\t- keycode: any code from GameKeys\n" "\tSet the first modifier to the key this sensor should listen to.\n" ; -PyObject* SCA_KeyboardSensor::PySetHold2(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PySetHold2(PyObject* args) { ShowDeprecationWarning("setHold2()", "the hold2 property"); int keyCode; @@ -508,7 +508,7 @@ const char SCA_KeyboardSensor::GetPressedKeys_doc[] = "getPressedKeys()\n" "\tGet a list of pressed keys that have either been pressed, or just released this frame.\n" ; -PyObject* SCA_KeyboardSensor::PyGetPressedKeys(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PyGetPressedKeys() { ShowDeprecationWarning("getPressedKeys()", "events"); @@ -549,7 +549,7 @@ const char SCA_KeyboardSensor::GetCurrentlyPressedKeys_doc[] = "getCurrentlyPressedKeys()\n" "\tGet a list of keys that are currently pressed.\n" ; -PyObject* SCA_KeyboardSensor::PyGetCurrentlyPressedKeys(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_KeyboardSensor::PyGetCurrentlyPressedKeys() { ShowDeprecationWarning("getCurrentlyPressedKeys()", "events"); @@ -640,14 +640,14 @@ PyParentObject SCA_KeyboardSensor::Parents[] = { PyMethodDef SCA_KeyboardSensor::Methods[] = { //Deprecated functions ------> - {"getKey", (PyCFunction) SCA_KeyboardSensor::sPyGetKey, METH_VARARGS, (PY_METHODCHAR)GetKey_doc}, + {"getKey", (PyCFunction) SCA_KeyboardSensor::sPyGetKey, METH_NOARGS, (PY_METHODCHAR)GetKey_doc}, {"setKey", (PyCFunction) SCA_KeyboardSensor::sPySetKey, METH_VARARGS, (PY_METHODCHAR)SetKey_doc}, - {"getHold1", (PyCFunction) SCA_KeyboardSensor::sPyGetHold1, METH_VARARGS, (PY_METHODCHAR)GetHold1_doc}, + {"getHold1", (PyCFunction) SCA_KeyboardSensor::sPyGetHold1, METH_NOARGS, (PY_METHODCHAR)GetHold1_doc}, {"setHold1", (PyCFunction) SCA_KeyboardSensor::sPySetHold1, METH_VARARGS, (PY_METHODCHAR)SetHold1_doc}, - {"getHold2", (PyCFunction) SCA_KeyboardSensor::sPyGetHold2, METH_VARARGS, (PY_METHODCHAR)GetHold2_doc}, + {"getHold2", (PyCFunction) SCA_KeyboardSensor::sPyGetHold2, METH_NOARGS, (PY_METHODCHAR)GetHold2_doc}, {"setHold2", (PyCFunction) SCA_KeyboardSensor::sPySetHold2, METH_VARARGS, (PY_METHODCHAR)SetHold2_doc}, - {"getPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetPressedKeys, METH_VARARGS, (PY_METHODCHAR)GetPressedKeys_doc}, - {"getCurrentlyPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetCurrentlyPressedKeys, METH_VARARGS, (PY_METHODCHAR)GetCurrentlyPressedKeys_doc}, + {"getPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetPressedKeys, METH_NOARGS, (PY_METHODCHAR)GetPressedKeys_doc}, + {"getCurrentlyPressedKeys", (PyCFunction) SCA_KeyboardSensor::sPyGetCurrentlyPressedKeys, METH_NOARGS, (PY_METHODCHAR)GetCurrentlyPressedKeys_doc}, //<----- Deprecated KX_PYMETHODTABLE_O(SCA_KeyboardSensor, getKeyStatus), {NULL,NULL} //Sentinel diff --git a/source/gameengine/GameLogic/SCA_KeyboardSensor.h b/source/gameengine/GameLogic/SCA_KeyboardSensor.h index eb26afc96ff..073b3e6dbe0 100644 --- a/source/gameengine/GameLogic/SCA_KeyboardSensor.h +++ b/source/gameengine/GameLogic/SCA_KeyboardSensor.h @@ -115,21 +115,21 @@ public: //Deprecated functions -----> /** 1. GetKey : check which key this sensor looks at */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetKey); + KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetKey); /** 2. SetKey: change the key to look at */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetKey); + KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetKey); /** 3. GetHold1 : set the first bucky bit */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetHold1); + KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold1); /** 4. SetHold1: change the first bucky bit */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetHold1); + KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold1); /** 5. GetHold2 : set the second bucky bit */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetHold2); + KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetHold2); /** 6. SetHold2: change the second bucky bit */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,SetHold2); + KX_PYMETHOD_DOC_VARARGS(SCA_KeyboardSensor,SetHold2); /** 9. GetPressedKeys: */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetPressedKeys); + KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetPressedKeys); /** 9. GetCurrrentlyPressedKeys: */ - KX_PYMETHOD_DOC(SCA_KeyboardSensor,GetCurrentlyPressedKeys); + KX_PYMETHOD_DOC_NOARGS(SCA_KeyboardSensor,GetCurrentlyPressedKeys); // <------ // KeyEvents: diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.cpp b/source/gameengine/GameLogic/SCA_MouseSensor.cpp index 0c30f503068..8f41e799b01 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.cpp +++ b/source/gameengine/GameLogic/SCA_MouseSensor.cpp @@ -252,9 +252,7 @@ const char SCA_MouseSensor::GetXPosition_doc[] = "\tReturns the x-coordinate of the mouse sensor, in frame coordinates.\n" "\tThe lower-left corner is the origin. The coordinate is given in\n" "\tpixels\n"; -PyObject* SCA_MouseSensor::PyGetXPosition(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* SCA_MouseSensor::PyGetXPosition() { ShowDeprecationWarning("getXPosition()", "the position property"); return PyInt_FromLong(m_x); } @@ -265,9 +263,7 @@ const char SCA_MouseSensor::GetYPosition_doc[] = "\tReturns the y-coordinate of the mouse sensor, in frame coordinates.\n" "\tThe lower-left corner is the origin. The coordinate is given in\n" "\tpixels\n"; -PyObject* SCA_MouseSensor::PyGetYPosition(PyObject* self, - PyObject* args, - PyObject* kwds) { +PyObject* SCA_MouseSensor::PyGetYPosition() { ShowDeprecationWarning("getYPosition()", "the position property"); return PyInt_FromLong(m_y); } diff --git a/source/gameengine/GameLogic/SCA_MouseSensor.h b/source/gameengine/GameLogic/SCA_MouseSensor.h index 73410569cc2..2d1c496029d 100644 --- a/source/gameengine/GameLogic/SCA_MouseSensor.h +++ b/source/gameengine/GameLogic/SCA_MouseSensor.h @@ -114,9 +114,9 @@ class SCA_MouseSensor : public SCA_ISensor //Deprecated functions -----> /* read x-coordinate */ - KX_PYMETHOD_DOC(SCA_MouseSensor,GetXPosition); + KX_PYMETHOD_DOC_NOARGS(SCA_MouseSensor,GetXPosition); /* read y-coordinate */ - KX_PYMETHOD_DOC(SCA_MouseSensor,GetYPosition); + KX_PYMETHOD_DOC_NOARGS(SCA_MouseSensor,GetYPosition); //<----- deprecated // get button status diff --git a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp index 4bcb59d0812..c4db723ee89 100644 --- a/source/gameengine/GameLogic/SCA_PropertyActuator.cpp +++ b/source/gameengine/GameLogic/SCA_PropertyActuator.cpp @@ -289,7 +289,7 @@ const char SCA_PropertyActuator::SetProperty_doc[] = "\t- name: string\n" "\tSet the property on which to operate. If there is no property\n" "\tof this name, the call is ignored.\n"; -PyObject* SCA_PropertyActuator::PySetProperty(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertyActuator::PySetProperty(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setProperty()", "the 'property' property"); /* Check whether the name exists first ! */ @@ -314,7 +314,7 @@ PyObject* SCA_PropertyActuator::PySetProperty(PyObject* self, PyObject* args, Py const char SCA_PropertyActuator::GetProperty_doc[] = "getProperty(name)\n" "\tReturn the property on which the actuator operates.\n"; -PyObject* SCA_PropertyActuator::PyGetProperty(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertyActuator::PyGetProperty(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getProperty()", "the 'property' property"); return PyString_FromString(m_propname); @@ -327,7 +327,7 @@ const char SCA_PropertyActuator::SetValue_doc[] = "\tSet the value with which the actuator operates. If the value\n" "\tis not compatible with the type of the property, the subsequent\n" "\t action is ignored.\n"; -PyObject* SCA_PropertyActuator::PySetValue(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertyActuator::PySetValue(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("setValue()", "the value property"); char *valArg; @@ -344,7 +344,7 @@ PyObject* SCA_PropertyActuator::PySetValue(PyObject* self, PyObject* args, PyObj const char SCA_PropertyActuator::GetValue_doc[] = "getValue()\n" "\tReturns the value with which the actuator operates.\n"; -PyObject* SCA_PropertyActuator::PyGetValue(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertyActuator::PyGetValue(PyObject* args, PyObject* kwds) { ShowDeprecationWarning("getValue()", "the value property"); return PyString_FromString(m_exprtxt); diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index 5c8a14db563..de8a9fcf03e 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp +++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp @@ -334,11 +334,11 @@ PyParentObject SCA_PropertySensor::Parents[] = { PyMethodDef SCA_PropertySensor::Methods[] = { //Deprecated functions ------> - {"getType", (PyCFunction) SCA_PropertySensor::sPyGetType, METH_VARARGS, (PY_METHODCHAR)GetType_doc}, + {"getType", (PyCFunction) SCA_PropertySensor::sPyGetType, METH_NOARGS, (PY_METHODCHAR)GetType_doc}, {"setType", (PyCFunction) SCA_PropertySensor::sPySetType, METH_VARARGS, (PY_METHODCHAR)SetType_doc}, - {"getProperty", (PyCFunction) SCA_PropertySensor::sPyGetProperty, METH_VARARGS, (PY_METHODCHAR)GetProperty_doc}, + {"getProperty", (PyCFunction) SCA_PropertySensor::sPyGetProperty, METH_NOARGS, (PY_METHODCHAR)GetProperty_doc}, {"setProperty", (PyCFunction) SCA_PropertySensor::sPySetProperty, METH_VARARGS, (PY_METHODCHAR)SetProperty_doc}, - {"getValue", (PyCFunction) SCA_PropertySensor::sPyGetValue, METH_VARARGS, (PY_METHODCHAR)GetValue_doc}, + {"getValue", (PyCFunction) SCA_PropertySensor::sPyGetValue, METH_NOARGS, (PY_METHODCHAR)GetValue_doc}, {"setValue", (PyCFunction) SCA_PropertySensor::sPySetValue, METH_VARARGS, (PY_METHODCHAR)SetValue_doc}, //<----- Deprecated {NULL,NULL} //Sentinel @@ -364,7 +364,7 @@ int SCA_PropertySensor::py_setattro(PyObject *attr, PyObject *value) { const char SCA_PropertySensor::GetType_doc[] = "getType()\n" "\tReturns the type of check this sensor performs.\n"; -PyObject* SCA_PropertySensor::PyGetType(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertySensor::PyGetType() { ShowDeprecationWarning("getType()", "the type property"); return PyInt_FromLong(m_checktype); @@ -377,7 +377,7 @@ const char SCA_PropertySensor::SetType_doc[] = "\t KX_PROPSENSOR_INTERVAL, KX_PROPSENSOR_CHANGED,\n" "\t or KX_PROPSENSOR_EXPRESSION.\n" "\tSet the type of check to perform.\n"; -PyObject* SCA_PropertySensor::PySetType(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertySensor::PySetType(PyObject* args) { ShowDeprecationWarning("setType()", "the type property"); int typeArg; @@ -398,7 +398,7 @@ PyObject* SCA_PropertySensor::PySetType(PyObject* self, PyObject* args, PyObject const char SCA_PropertySensor::GetProperty_doc[] = "getProperty()\n" "\tReturn the property with which the sensor operates.\n"; -PyObject* SCA_PropertySensor::PyGetProperty(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertySensor::PyGetProperty() { ShowDeprecationWarning("getProperty()", "the 'property' property"); return PyString_FromString(m_checkpropname); @@ -410,7 +410,7 @@ const char SCA_PropertySensor::SetProperty_doc[] = "\t- name: string\n" "\tSets the property with which to operate. If there is no property\n" "\tof this name, the call is ignored.\n"; -PyObject* SCA_PropertySensor::PySetProperty(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertySensor::PySetProperty(PyObject* args) { ShowDeprecationWarning("setProperty()", "the 'property' property"); /* We should query whether the name exists. Or should we create a prop */ @@ -435,7 +435,7 @@ PyObject* SCA_PropertySensor::PySetProperty(PyObject* self, PyObject* args, PyOb const char SCA_PropertySensor::GetValue_doc[] = "getValue()\n" "\tReturns the value with which the sensor operates.\n"; -PyObject* SCA_PropertySensor::PyGetValue(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertySensor::PyGetValue() { ShowDeprecationWarning("getValue()", "the value property"); return PyString_FromString(m_checkpropval); @@ -448,7 +448,7 @@ const char SCA_PropertySensor::SetValue_doc[] = "\tSet the value with which the sensor operates. If the value\n" "\tis not compatible with the type of the property, the subsequent\n" "\t action is ignored.\n"; -PyObject* SCA_PropertySensor::PySetValue(PyObject* self, PyObject* args, PyObject* kwds) +PyObject* SCA_PropertySensor::PySetValue(PyObject* args) { ShowDeprecationWarning("setValue()", "the value property"); /* Here, we need to check whether the value is 'valid' for this property.*/ @@ -460,7 +460,7 @@ PyObject* SCA_PropertySensor::PySetValue(PyObject* self, PyObject* args, PyObjec } STR_String oldval = m_checkpropval; m_checkpropval = propValArg; - if (validValueForProperty(self, NULL)) { + if (validValueForProperty(m_proxy, NULL)) { m_checkpropval = oldval; return NULL; } diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.h b/source/gameengine/GameLogic/SCA_PropertySensor.h index 076c1ae51ec..e1e378a973c 100644 --- a/source/gameengine/GameLogic/SCA_PropertySensor.h +++ b/source/gameengine/GameLogic/SCA_PropertySensor.h @@ -93,17 +93,17 @@ public: virtual int py_setattro(PyObject *attr, PyObject *value); /* 1. getType */ - KX_PYMETHOD_DOC(SCA_PropertySensor,GetType); + KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetType); /* 2. setType */ - KX_PYMETHOD_DOC(SCA_PropertySensor,SetType); + KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetType); /* 3. setProperty */ - KX_PYMETHOD_DOC(SCA_PropertySensor,SetProperty); + KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetProperty); /* 4. getProperty */ - KX_PYMETHOD_DOC(SCA_PropertySensor,GetProperty); + KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetProperty); /* 5. getValue */ - KX_PYMETHOD_DOC(SCA_PropertySensor,GetValue); + KX_PYMETHOD_DOC_NOARGS(SCA_PropertySensor,GetValue); /* 6. setValue */ - KX_PYMETHOD_DOC(SCA_PropertySensor,SetValue); + KX_PYMETHOD_DOC_VARARGS(SCA_PropertySensor,SetValue); /** * Test whether this is a sensible value (type check) */ diff --git a/source/gameengine/GameLogic/SCA_PythonController.cpp b/source/gameengine/GameLogic/SCA_PythonController.cpp index 0d096385fa9..121f868a281 100644 --- a/source/gameengine/GameLogic/SCA_PythonController.cpp +++ b/source/gameengine/GameLogic/SCA_PythonController.cpp @@ -154,8 +154,8 @@ int SCA_PythonController::IsTriggered(class SCA_ISensor* sensor) static const char* sPyGetCurrentController__doc__; #endif - -PyObject* SCA_PythonController::sPyGetCurrentController(PyObject* self) +/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */ +PyObject* SCA_PythonController::sPyGetCurrentController(PyObject *self) { return m_sCurrentController->GetProxy(); } @@ -197,12 +197,9 @@ SCA_IActuator* SCA_PythonController::LinkedActuatorFromPy(PyObject *value) static const char* sPyAddActiveActuator__doc__; #endif -PyObject* SCA_PythonController::sPyAddActiveActuator( - - PyObject* self, - PyObject* args) +/* warning, self is not the SCA_PythonController, its a PyObjectPlus_Proxy */ +PyObject* SCA_PythonController::sPyAddActiveActuator(PyObject* self, PyObject* args) { - PyObject* ob1; int activate; if (!PyArg_ParseTuple(args, "Oi:addActiveActuator", &ob1,&activate)) @@ -384,7 +381,7 @@ int SCA_PythonController::py_setattro(PyObject *attr, PyObject *value) py_setattro_up(SCA_IController); } -PyObject* SCA_PythonController::PyActivate(PyObject* self, PyObject *value) +PyObject* SCA_PythonController::PyActivate(PyObject *value) { SCA_IActuator* actu = LinkedActuatorFromPy(value); if(actu==NULL) @@ -396,7 +393,7 @@ PyObject* SCA_PythonController::PyActivate(PyObject* self, PyObject *value) Py_RETURN_NONE; } -PyObject* SCA_PythonController::PyDeActivate(PyObject* self, PyObject *value) +PyObject* SCA_PythonController::PyDeActivate(PyObject *value) { SCA_IActuator* actu = LinkedActuatorFromPy(value); if(actu==NULL) @@ -408,7 +405,7 @@ PyObject* SCA_PythonController::PyDeActivate(PyObject* self, PyObject *value) Py_RETURN_NONE; } -PyObject* SCA_PythonController::PyGetActuators(PyObject* self) +PyObject* SCA_PythonController::PyGetActuators() { PyObject* resultlist = PyList_New(m_linkedactuators.size()); for (unsigned int index=0;index {"setSeed", (PyCFunction) SCA_RandomActuator::sPySetSeed, METH_VARARGS, (PY_METHODCHAR)SetSeed_doc}, - {"getSeed", (PyCFunction) SCA_RandomActuator::sPyGetSeed, METH_VARARGS, (PY_METHODCHAR)GetSeed_doc}, - {"getPara1", (PyCFunction) SCA_RandomActuator::sPyGetPara1, METH_VARARGS, (PY_METHODCHAR)GetPara1_doc}, - {"getPara2", (PyCFunction) SCA_RandomActuator::sPyGetPara2, METH_VARARGS, (PY_METHODCHAR)GetPara2_doc}, - {"getDistribution", (PyCFunction) SCA_RandomActuator::sPyGetDistribution, METH_VARARGS, (PY_METHODCHAR)GetDistribution_doc}, + {"getSeed", (PyCFunction) SCA_RandomActuator::sPyGetSeed, METH_NOARGS, (PY_METHODCHAR)GetSeed_doc}, + {"getPara1", (PyCFunction) SCA_RandomActuator::sPyGetPara1, METH_NOARGS, (PY_METHODCHAR)GetPara1_doc}, + {"getPara2", (PyCFunction) SCA_RandomActuator::sPyGetPara2, METH_NOARGS, (PY_METHODCHAR)GetPara2_doc}, + {"getDistribution", (PyCFunction) SCA_RandomActuator::sPyGetDistribution, METH_NOARGS, (PY_METHODCHAR)GetDistribution_doc}, {"setProperty", (PyCFunction) SCA_RandomActuator::sPySetProperty, METH_VARARGS, (PY_METHODCHAR)SetProperty_doc}, - {"getProperty", (PyCFunction) SCA_RandomActuator::sPyGetProperty, METH_VARARGS, (PY_METHODCHAR)GetProperty_doc}, + {"getProperty", (PyCFunction) SCA_RandomActuator::sPyGetProperty, METH_NOARGS, (PY_METHODCHAR)GetProperty_doc}, //<----- Deprecated KX_PYMETHODTABLE(SCA_RandomActuator, setBoolConst), KX_PYMETHODTABLE_NOARGS(SCA_RandomActuator, setBoolUniform), @@ -407,7 +407,7 @@ const char SCA_RandomActuator::SetSeed_doc[] = "\tSet the initial seed of the generator. Equal seeds produce\n" "\tequal series. If the seed is 0, the generator will produce\n" "\tthe same value on every call.\n"; -PyObject* SCA_RandomActuator::PySetSeed(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomActuator::PySetSeed(PyObject* args) { ShowDeprecationWarning("setSeed()", "the seed property"); long seedArg; if(!PyArg_ParseTuple(args, "i:setSeed", &seedArg)) { @@ -423,7 +423,8 @@ const char SCA_RandomActuator::GetSeed_doc[] = "getSeed()\n" "\tReturns the initial seed of the generator. Equal seeds produce\n" "\tequal series.\n"; -PyObject* SCA_RandomActuator::PyGetSeed(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomActuator::PyGetSeed() +{ ShowDeprecationWarning("getSeed()", "the seed property"); return PyInt_FromLong(m_base->GetSeed()); } @@ -434,7 +435,8 @@ const char SCA_RandomActuator::GetPara1_doc[] = "\tReturns the first parameter of the active distribution. Refer\n" "\tto the documentation of the generator types for the meaning\n" "\tof this value."; -PyObject* SCA_RandomActuator::PyGetPara1(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomActuator::PyGetPara1() +{ ShowDeprecationWarning("getPara1()", "the para1 property"); return PyFloat_FromDouble(m_parameter1); } @@ -445,7 +447,8 @@ const char SCA_RandomActuator::GetPara2_doc[] = "\tReturns the first parameter of the active distribution. Refer\n" "\tto the documentation of the generator types for the meaning\n" "\tof this value."; -PyObject* SCA_RandomActuator::PyGetPara2(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomActuator::PyGetPara2() +{ ShowDeprecationWarning("getPara2()", "the para2 property"); return PyFloat_FromDouble(m_parameter2); } @@ -454,7 +457,8 @@ PyObject* SCA_RandomActuator::PyGetPara2(PyObject* self, PyObject* args, PyObjec const char SCA_RandomActuator::GetDistribution_doc[] = "getDistribution()\n" "\tReturns the type of the active distribution.\n"; -PyObject* SCA_RandomActuator::PyGetDistribution(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomActuator::PyGetDistribution() +{ ShowDeprecationWarning("getDistribution()", "the distribution property"); return PyInt_FromLong(m_distribution); } @@ -465,7 +469,7 @@ const char SCA_RandomActuator::SetProperty_doc[] = "\t- name: string\n" "\tSet the property to which the random value is assigned. If the \n" "\tgenerator and property types do not match, the assignment is ignored.\n"; -PyObject* SCA_RandomActuator::PySetProperty(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomActuator::PySetProperty(PyObject* args) { ShowDeprecationWarning("setProperty()", "the 'property' property"); char *nameArg; if (!PyArg_ParseTuple(args, "s:setProperty", &nameArg)) { @@ -488,7 +492,8 @@ const char SCA_RandomActuator::GetProperty_doc[] = "getProperty(name)\n" "\tReturn the property to which the random value is assigned. If the \n" "\tgenerator and property types do not match, the assignment is ignored.\n"; -PyObject* SCA_RandomActuator::PyGetProperty(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomActuator::PyGetProperty() +{ ShowDeprecationWarning("getProperty()", "the 'property' property"); return PyString_FromString(m_propname); } diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.h b/source/gameengine/GameLogic/SCA_RandomActuator.h index fbafbb69c01..8f58ed0dcec 100644 --- a/source/gameengine/GameLogic/SCA_RandomActuator.h +++ b/source/gameengine/GameLogic/SCA_RandomActuator.h @@ -103,13 +103,13 @@ class SCA_RandomActuator : public SCA_IActuator static int pyattr_set_seed(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); // Deprecated methods -----> - KX_PYMETHOD_DOC(SCA_RandomActuator,SetSeed); - KX_PYMETHOD_DOC(SCA_RandomActuator,GetSeed); - KX_PYMETHOD_DOC(SCA_RandomActuator,GetPara1); - KX_PYMETHOD_DOC(SCA_RandomActuator,GetPara2); - KX_PYMETHOD_DOC(SCA_RandomActuator,GetDistribution); - KX_PYMETHOD_DOC(SCA_RandomActuator,SetProperty); - KX_PYMETHOD_DOC(SCA_RandomActuator,GetProperty); + KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator,SetSeed); + KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetSeed); + KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetPara1); + KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetPara2); + KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetDistribution); + KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator,SetProperty); + KX_PYMETHOD_DOC_NOARGS(SCA_RandomActuator,GetProperty); // <----- KX_PYMETHOD_DOC_VARARGS(SCA_RandomActuator, setBoolConst); diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.cpp b/source/gameengine/GameLogic/SCA_RandomSensor.cpp index b0bc518825b..e04d2a8ab90 100644 --- a/source/gameengine/GameLogic/SCA_RandomSensor.cpp +++ b/source/gameengine/GameLogic/SCA_RandomSensor.cpp @@ -155,8 +155,8 @@ PyParentObject SCA_RandomSensor::Parents[] = { PyMethodDef SCA_RandomSensor::Methods[] = { {"setSeed", (PyCFunction) SCA_RandomSensor::sPySetSeed, METH_VARARGS, (PY_METHODCHAR)SetSeed_doc}, - {"getSeed", (PyCFunction) SCA_RandomSensor::sPyGetSeed, METH_VARARGS, (PY_METHODCHAR)GetSeed_doc}, - {"getLastDraw", (PyCFunction) SCA_RandomSensor::sPyGetLastDraw, METH_VARARGS, (PY_METHODCHAR)GetLastDraw_doc}, + {"getSeed", (PyCFunction) SCA_RandomSensor::sPyGetSeed, METH_NOARGS, (PY_METHODCHAR)GetSeed_doc}, + {"getLastDraw", (PyCFunction) SCA_RandomSensor::sPyGetLastDraw, METH_NOARGS, (PY_METHODCHAR)GetLastDraw_doc}, {NULL,NULL} //Sentinel }; @@ -182,7 +182,7 @@ const char SCA_RandomSensor::SetSeed_doc[] = "\tSet the initial seed of the generator. Equal seeds produce\n" "\tequal series. If the seed is 0, the generator will produce\n" "\tthe same value on every call.\n"; -PyObject* SCA_RandomSensor::PySetSeed(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomSensor::PySetSeed(PyObject* args) { ShowDeprecationWarning("setSeed()", "the seed property"); long seedArg; if(!PyArg_ParseTuple(args, "i:setSeed", &seedArg)) { @@ -199,7 +199,7 @@ const char SCA_RandomSensor::GetSeed_doc[] = "getSeed()\n" "\tReturns the initial seed of the generator. Equal seeds produce\n" "\tequal series.\n"; -PyObject* SCA_RandomSensor::PyGetSeed(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomSensor::PyGetSeed() { ShowDeprecationWarning("getSeed()", "the seed property"); return PyInt_FromLong(m_basegenerator->GetSeed()); } @@ -208,7 +208,7 @@ PyObject* SCA_RandomSensor::PyGetSeed(PyObject* self, PyObject* args, PyObject* const char SCA_RandomSensor::GetLastDraw_doc[] = "getLastDraw()\n" "\tReturn the last value that was drawn.\n"; -PyObject* SCA_RandomSensor::PyGetLastDraw(PyObject* self, PyObject* args, PyObject* kwds) { +PyObject* SCA_RandomSensor::PyGetLastDraw() { ShowDeprecationWarning("getLastDraw()", "the lastDraw property"); return PyInt_FromLong(m_lastdraw); } diff --git a/source/gameengine/GameLogic/SCA_RandomSensor.h b/source/gameengine/GameLogic/SCA_RandomSensor.h index 844552f0b64..764692600c3 100644 --- a/source/gameengine/GameLogic/SCA_RandomSensor.h +++ b/source/gameengine/GameLogic/SCA_RandomSensor.h @@ -64,11 +64,11 @@ public: virtual int py_setattro(PyObject *attr, PyObject *value); /* 1. setSeed */ - KX_PYMETHOD_DOC(SCA_RandomSensor,SetSeed); + KX_PYMETHOD_DOC_VARARGS(SCA_RandomSensor,SetSeed); /* 2. getSeed */ - KX_PYMETHOD_DOC(SCA_RandomSensor,GetSeed); - /* 3. getSeed */ - KX_PYMETHOD_DOC(SCA_RandomSensor,GetLastDraw); + KX_PYMETHOD_DOC_NOARGS(SCA_RandomSensor,GetSeed); + /* 3. getLastDraw */ + KX_PYMETHOD_DOC_NOARGS(SCA_RandomSensor,GetLastDraw); static PyObject* pyattr_get_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_seed(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); 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; matidNumMaterials(); 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; matidNumMaterials(); 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); // <----- diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h index c7638b36728..4510bbddf65 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h @@ -107,7 +107,7 @@ public: } CcdShapeConstructionInfo* GetChildShape(int i) { - if (i < 0 || i >= m_shapeArray.size()) + if (i < 0 || i >= (int)m_shapeArray.size()) return NULL; return m_shapeArray.at(i); @@ -116,7 +116,7 @@ public: { if (shapeInfo == NULL) return -1; - for (int i=0; im_userData) && @@ -130,10 +130,10 @@ public: bool RemoveChildShape(int i) { - if (i < 0 || i >= m_shapeArray.size()) + if (i < 0 || i >= (int)m_shapeArray.size()) return false; m_shapeArray.at(i)->Release(); - if (i < m_shapeArray.size()-1) + if (i < (int)m_shapeArray.size()-1) m_shapeArray[i] = m_shapeArray.back(); m_shapeArray.pop_back(); return true; -- cgit v1.2.3