[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19642] trunk/blender/source/gameengine: Added function name to many of the PyArg_ParseTuple calls in gameengine
André Pinto
andresusanopinto at gmail.com
Fri Apr 10 18:45:21 CEST 2009
Revision: 19642
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19642
Author: jaguarandi
Date: 2009-04-10 18:45:19 +0200 (Fri, 10 Apr 2009)
Log Message:
-----------
Added function name to many of the PyArg_ParseTuple calls in gameengine
This way python raises more useful messages.
Modified Paths:
--------------
trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp
trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
trunk/blender/source/gameengine/Expressions/Value.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_PropertyActuator.cpp
trunk/blender/source/gameengine/GameLogic/SCA_PropertySensor.cpp
trunk/blender/source/gameengine/GameLogic/SCA_PythonController.cpp
trunk/blender/source/gameengine/GameLogic/SCA_RandomActuator.cpp
trunk/blender/source/gameengine/GameLogic/SCA_RandomSensor.cpp
trunk/blender/source/gameengine/Ketsji/BL_Shader.cpp
trunk/blender/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
trunk/blender/source/gameengine/Ketsji/KX_CDActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_Camera.cpp
trunk/blender/source/gameengine/Ketsji/KX_CameraActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_ConstraintActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_GameActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_IpoActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_MeshProxy.cpp
trunk/blender/source/gameengine/Ketsji/KX_ObjectActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_ParentActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
trunk/blender/source/gameengine/Ketsji/KX_PolyProxy.cpp
trunk/blender/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
trunk/blender/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_Scene.cpp
trunk/blender/source/gameengine/Ketsji/KX_SceneActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_SoundActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_StateActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_TrackToActuator.cpp
trunk/blender/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
trunk/blender/source/gameengine/Ketsji/KX_VisibilityActuator.cpp
Modified: trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp 2009-04-10 16:30:28 UTC (rev 19641)
+++ trunk/blender/source/gameengine/Converter/BL_ActionActuator.cpp 2009-04-10 16:45:19 UTC (rev 19642)
@@ -573,7 +573,7 @@
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 @@
float start;
- if (PyArg_ParseTuple(args,"f",&start))
+ if (PyArg_ParseTuple(args,"f:setStart",&start))
{
m_startframe = start;
}
@@ -631,7 +631,7 @@
float end;
- if (PyArg_ParseTuple(args,"f",&end))
+ if (PyArg_ParseTuple(args,"f:setEnd",&end))
{
m_endframe = end;
}
@@ -655,7 +655,7 @@
float blendin;
- if (PyArg_ParseTuple(args,"f",&blendin))
+ if (PyArg_ParseTuple(args,"f:setBlendin",&blendin))
{
m_blendin = blendin;
}
@@ -680,7 +680,7 @@
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 @@
int priority;
- if (PyArg_ParseTuple(args,"i",&priority))
+ if (PyArg_ParseTuple(args,"i:setPriority",&priority))
{
m_priority = priority;
}
@@ -732,7 +732,7 @@
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 @@
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:setProperty",&string))
{
m_propname = string;
}
@@ -783,7 +783,7 @@
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:setFrameProperty",&string))
{
m_framepropname = string;
}
@@ -800,7 +800,7 @@
PyObject* kwds) {
char *string;
- if (PyArg_ParseTuple(args,"s",&string))
+ if (PyArg_ParseTuple(args,"s:getChannel",&string))
{
m_propname = string;
}
@@ -836,7 +836,7 @@
short typeArg;
- if (!PyArg_ParseTuple(args, "h", &typeArg)) {
+ if (!PyArg_ParseTuple(args, "h:setType", &typeArg)) {
return NULL;
}
@@ -894,7 +894,7 @@
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)
Modified: trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp 2009-04-10 16:30:28 UTC (rev 19641)
+++ trunk/blender/source/gameengine/Converter/BL_ShapeActionActuator.cpp 2009-04-10 16:45:19 UTC (rev 19642)
@@ -610,7 +610,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
ShowDeprecationWarning("setType()", "the type property");
short typeArg;
- if (!PyArg_ParseTuple(args, "h", &typeArg)) {
+ if (!PyArg_ParseTuple(args, "h:setType", &typeArg)) {
return NULL;
}
Modified: trunk/blender/source/gameengine/Expressions/Value.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/Value.cpp 2009-04-10 16:30:28 UTC (rev 19641)
+++ trunk/blender/source/gameengine/Expressions/Value.cpp 2009-04-10 16:45:19 UTC (rev 19642)
@@ -830,7 +830,7 @@
PyObject* CValue::PyMake(PyObject* ignored,PyObject* args)
{
- //if (!PyArg_ParseTuple(args,"s",&name)) return NULL;
+ //if (!PyArg_ParseTuple(args,"s:make",&name)) return NULL;
Py_RETURN_NONE;//new CValue();
}
*/
Modified: trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp 2009-04-10 16:30:28 UTC (rev 19641)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ActuatorSensor.cpp 2009-04-10 16:45:19 UTC (rev 19642)
@@ -204,7 +204,7 @@
/* on the fly? */
char *actNameArg = NULL;
- if (!PyArg_ParseTuple(args, "s", &actNameArg)) {
+ if (!PyArg_ParseTuple(args, "s:setActuator", &actNameArg)) {
return NULL;
}
Modified: trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp 2009-04-10 16:30:28 UTC (rev 19641)
+++ trunk/blender/source/gameengine/GameLogic/SCA_DelaySensor.cpp 2009-04-10 16:45:19 UTC (rev 19642)
@@ -197,7 +197,7 @@
ShowDeprecationWarning("setDelay()", "the delay property");
int delay;
- if(!PyArg_ParseTuple(args, "i", &delay)) {
+ if(!PyArg_ParseTuple(args, "i:setDelay", &delay)) {
return NULL;
}
if (delay < 0) {
@@ -219,7 +219,7 @@
ShowDeprecationWarning("setDuration()", "the duration property");
int duration;
- if(!PyArg_ParseTuple(args, "i", &duration)) {
+ if(!PyArg_ParseTuple(args, "i:setDuration", &duration)) {
return NULL;
}
if (duration < 0) {
@@ -240,7 +240,7 @@
ShowDeprecationWarning("setRepeat()", "the repeat property");
int repeat;
- if(!PyArg_ParseTuple(args, "i", &repeat)) {
+ if(!PyArg_ParseTuple(args, "i:setRepeat", &repeat)) {
return NULL;
}
m_repeat = (repeat != 0);
Modified: trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp 2009-04-10 16:30:28 UTC (rev 19641)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ILogicBrick.cpp 2009-04-10 16:45:19 UTC (rev 19642)
@@ -312,7 +312,7 @@
int priority=0;
- if (!PyArg_ParseTuple(args, "i", &priority)) {
+ if (!PyArg_ParseTuple(args, "i:setExecutePriority", &priority)) {
return NULL;
}
Modified: trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp 2009-04-10 16:30:28 UTC (rev 19641)
+++ trunk/blender/source/gameengine/GameLogic/SCA_ISensor.cpp 2009-04-10 16:45:19 UTC (rev 19642)
@@ -262,7 +262,7 @@
{
ShowDeprecationWarning("setUsePosPulseMode()", "the usePosPulseMode property");
int pyarg = 0;
- if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
+ if(!PyArg_ParseTuple(args, "i:setUsePosPulseMode", &pyarg)) { return NULL; }
m_pos_pulsemode = PyArgToBool(pyarg);
Py_RETURN_NONE;
}
@@ -292,7 +292,7 @@
ShowDeprecationWarning("setFrequency()", "the frequency property");
int pulse_frequencyArg = 0;
- if(!PyArg_ParseTuple(args, "i", &pulse_frequencyArg)) {
+ if(!PyArg_ParseTuple(args, "i:setFrequency", &pulse_frequencyArg)) {
return NULL;
}
@@ -324,7 +324,7 @@
{
ShowDeprecationWarning("setInvert()", "the invert property");
int pyarg = 0;
- if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
+ if(!PyArg_ParseTuple(args, "i:setInvert", &pyarg)) { return NULL; }
m_invert = PyArgToBool(pyarg);
Py_RETURN_NONE;
}
@@ -350,7 +350,7 @@
{
ShowDeprecationWarning("setLevel()", "the level property");
int pyarg = 0;
- if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
+ if(!PyArg_ParseTuple(args, "i:setLevel", &pyarg)) { return NULL; }
m_level = PyArgToBool(pyarg);
Py_RETURN_NONE;
}
@@ -373,7 +373,7 @@
{
ShowDeprecationWarning("setUseNegPulseMode()", "the useNegPulseMode property");
int pyarg = 0;
- if(!PyArg_ParseTuple(args, "i", &pyarg)) { return NULL; }
+ if(!PyArg_ParseTuple(args, "i:setUseNegPulseMode", &pyarg)) { return NULL; }
m_neg_pulsemode = PyArgToBool(pyarg);
Py_RETURN_NONE;
}
Modified: trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_JoystickSensor.cpp 2009-04-10 16:30:28 UTC (rev 19641)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list