Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-04-19 21:29:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-19 21:29:07 +0400
commit6bc162e679d8b52b28e205de76985a1735abbf0a (patch)
tree675375b547c1ba593f02fa9394273d95cfe57ae7 /source/gameengine/Converter
parentfe08da3b4c4097c87c4ee1ee02e9218aaaffde4b (diff)
BGE Python API
removed redundant (PyObject *self) argument from python functions that are not exposed to python directly.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp64
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp58
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.h22
3 files changed, 52 insertions, 92 deletions
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);