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:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2009-04-10 20:45:19 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2009-04-10 20:45:19 +0400
commit2fff90bbb4a922f454c15dbf2d6215bd4d8c519c (patch)
treedfc2955a85c8f0fe61eaa9716eee8f6341c1197b /source/gameengine/Converter
parenta412ce0702101628ac827d53465354c05fed7927 (diff)
Added function name to many of the PyArg_ParseTuple calls in gameengine
This way python raises more useful messages.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp24
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp20
2 files changed, 22 insertions, 22 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 8d7624db5d4..960eafda230 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -573,7 +573,7 @@ PyObject* BL_ActionActuator::PySetAction(PyObject* self,
char *string;
int reset = 1;
- if (PyArg_ParseTuple(args,"s|i",&string, &reset))
+ if (PyArg_ParseTuple(args,"s|i:setAction",&string, &reset))
{
bAction *action;
@@ -608,7 +608,7 @@ PyObject* BL_ActionActuator::PySetStart(PyObject* self,
float start;
- if (PyArg_ParseTuple(args,"f",&start))
+ if (PyArg_ParseTuple(args,"f:setStart",&start))
{
m_startframe = start;
}
@@ -631,7 +631,7 @@ PyObject* BL_ActionActuator::PySetEnd(PyObject* self,
float end;
- if (PyArg_ParseTuple(args,"f",&end))
+ if (PyArg_ParseTuple(args,"f:setEnd",&end))
{
m_endframe = end;
}
@@ -655,7 +655,7 @@ PyObject* BL_ActionActuator::PySetBlendin(PyObject* self,
float blendin;
- if (PyArg_ParseTuple(args,"f",&blendin))
+ if (PyArg_ParseTuple(args,"f:setBlendin",&blendin))
{
m_blendin = blendin;
}
@@ -680,7 +680,7 @@ PyObject* BL_ActionActuator::PySetBlendtime(PyObject* self,
float blendframe;
- if (PyArg_ParseTuple(args,"f",&blendframe))
+ if (PyArg_ParseTuple(args,"f:setBlendtime",&blendframe))
{
m_blendframe = blendframe * m_blendin;
if (m_blendframe<0)
@@ -709,7 +709,7 @@ PyObject* BL_ActionActuator::PySetPriority(PyObject* self,
int priority;
- if (PyArg_ParseTuple(args,"i",&priority))
+ if (PyArg_ParseTuple(args,"i:setPriority",&priority))
{
m_priority = priority;
}
@@ -732,7 +732,7 @@ PyObject* BL_ActionActuator::PySetFrame(PyObject* self,
float frame;
- if (PyArg_ParseTuple(args,"f",&frame))
+ if (PyArg_ParseTuple(args,"f:setFrame",&frame))
{
m_localtime = frame;
if (m_localtime<m_startframe)
@@ -760,7 +760,7 @@ PyObject* BL_ActionActuator::PySetProperty(PyObject* self,
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:setProperty",&string))
{
m_propname = string;
}
@@ -783,7 +783,7 @@ PyObject* BL_ActionActuator::PySetFrameProperty(PyObject* self,
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:setFrameProperty",&string))
{
m_framepropname = string;
}
@@ -800,7 +800,7 @@ PyObject* BL_ActionActuator::PyGetChannel(PyObject* self,
PyObject* kwds) {
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:getChannel",&string))
{
m_propname = string;
}
@@ -836,7 +836,7 @@ PyObject* BL_ActionActuator::PySetType(PyObject* self,
short typeArg;
- if (!PyArg_ParseTuple(args, "h", &typeArg)) {
+ if (!PyArg_ParseTuple(args, "h:setType", &typeArg)) {
return NULL;
}
@@ -894,7 +894,7 @@ KX_PYMETHODDEF_DOC(BL_ActionActuator, setChannel,
int row,col;
int mode = 0; /* 0 for bone space, 1 for armature/world space */
- if (!PyArg_ParseTuple(args,"sO|i", &string, &pylist, &mode))
+ if (!PyArg_ParseTuple(args,"sO|i:setChannel", &string, &pylist, &mode))
return NULL;
if (pylist->ob_type == &CListValue::Type)
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 32fd566983a..0d35b26d604 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -610,7 +610,7 @@ PyObject* BL_ShapeActionActuator::PySetAction(PyObject* self,
char *string;
int reset = 1;
- if (PyArg_ParseTuple(args,"s|i",&string, &reset))
+ if (PyArg_ParseTuple(args,"s|i:setAction",&string, &reset))
{
bAction *action;
@@ -644,7 +644,7 @@ PyObject* BL_ShapeActionActuator::PySetStart(PyObject* self,
ShowDeprecationWarning("setStart()", "the start property");
float start;
- if (PyArg_ParseTuple(args,"f",&start))
+ if (PyArg_ParseTuple(args,"f:setStart",&start))
{
m_startframe = start;
}
@@ -666,7 +666,7 @@ PyObject* BL_ShapeActionActuator::PySetEnd(PyObject* self,
ShowDeprecationWarning("setEnd()", "the end property");
float end;
- if (PyArg_ParseTuple(args,"f",&end))
+ if (PyArg_ParseTuple(args,"f:setEnd",&end))
{
m_endframe = end;
}
@@ -689,7 +689,7 @@ PyObject* BL_ShapeActionActuator::PySetBlendin(PyObject* self,
ShowDeprecationWarning("setBlendin()", "the blendin property");
float blendin;
- if (PyArg_ParseTuple(args,"f",&blendin))
+ if (PyArg_ParseTuple(args,"f:setBlendin",&blendin))
{
m_blendin = blendin;
}
@@ -713,7 +713,7 @@ PyObject* BL_ShapeActionActuator::PySetBlendtime(PyObject* self,
ShowDeprecationWarning("setBlendtime()", "the blendTime property");
float blendframe;
- if (PyArg_ParseTuple(args,"f",&blendframe))
+ if (PyArg_ParseTuple(args,"f:setBlendtime",&blendframe))
{
m_blendframe = blendframe * m_blendin;
if (m_blendframe<0.f)
@@ -741,7 +741,7 @@ PyObject* BL_ShapeActionActuator::PySetPriority(PyObject* self,
ShowDeprecationWarning("setPriority()", "the priority property");
int priority;
- if (PyArg_ParseTuple(args,"i",&priority))
+ if (PyArg_ParseTuple(args,"i:setPriority",&priority))
{
m_priority = priority;
}
@@ -778,7 +778,7 @@ PyObject* BL_ShapeActionActuator::PySetFrame(PyObject* self,
ShowDeprecationWarning("setFrame()", "the frame property");
float frame;
- if (PyArg_ParseTuple(args,"f",&frame))
+ if (PyArg_ParseTuple(args,"f:setFrame",&frame))
{
m_localtime = frame;
if (m_localtime<m_startframe)
@@ -805,7 +805,7 @@ PyObject* BL_ShapeActionActuator::PySetProperty(PyObject* self,
ShowDeprecationWarning("setProperty()", "the property property");
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:setProperty",&string))
{
m_propname = string;
}
@@ -827,7 +827,7 @@ PyObject* BL_ShapeActionActuator::PySetFrameProperty(PyObject* self,
ShowDeprecationWarning("setFrameProperty()", "the frameProperty property");
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:setFrameProperty",&string))
{
m_framepropname = string;
}
@@ -858,7 +858,7 @@ PyObject* BL_ShapeActionActuator::PySetType(PyObject* self,
ShowDeprecationWarning("setType()", "the type property");
short typeArg;
- if (!PyArg_ParseTuple(args, "h", &typeArg)) {
+ if (!PyArg_ParseTuple(args, "h:setType", &typeArg)) {
return NULL;
}