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-20 01:01:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-20 01:01:12 +0400
commitf5fc4ebdd8ede5263f4b34f161ebe139d40466dc (patch)
tree7122404f3410c14cd225343cfc97bc0a97441f1e /source/gameengine/Converter
parentd78eec93197cc1d3cc9da773ce30396891ec60f6 (diff)
BGE Python API
- More verbose error messages. - BL_Shader wasnt setting error messages on some errors - FilterNormal depth attribute was checking for float which is bad because scripts often expect ints assigned to float attributes. - Added a check to PyVecTo for a tuple rather then always using a generic python sequence. On my system this is over 2x faster with an optmized build.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp4
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.h2
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.cpp4
-rw-r--r--source/gameengine/Converter/BL_ShapeActionActuator.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index f413ad969f4..7515f3f5f91 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -1037,7 +1037,7 @@ int BL_ActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF
if (!PyString_Check(value))
{
- PyErr_SetString(PyExc_ValueError, "expected the string name of the action");
+ PyErr_SetString(PyExc_ValueError, "actuator.action = val: Action Actuator, expected the string name of the action");
return -1;
}
@@ -1049,7 +1049,7 @@ int BL_ActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE_DEF
action= (bAction*)SCA_ILogicBrick::m_sCurrentLogicManager->GetActionByName(val);
if (!action)
{
- PyErr_SetString(PyExc_ValueError, "action not found!");
+ PyErr_SetString(PyExc_ValueError, "actuator.action = val: Action Actuator, action not found!");
return 1;
}
}
diff --git a/source/gameengine/Converter/BL_ActionActuator.h b/source/gameengine/Converter/BL_ActionActuator.h
index d5b5762d9e7..6ae7f716b4b 100644
--- a/source/gameengine/Converter/BL_ActionActuator.h
+++ b/source/gameengine/Converter/BL_ActionActuator.h
@@ -154,7 +154,7 @@ public:
case ACT_ACTION_FROM_PROP:
return 0;
default:
- PyErr_SetString(PyExc_ValueError, "invalid type supplied");
+ PyErr_SetString(PyExc_ValueError, "Action Actuator, invalid play type supplied");
return 1;
}
}
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.cpp b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
index 25a4413a31d..62bc99bb437 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.cpp
@@ -869,7 +869,7 @@ int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE
/* exact copy of BL_ActionActuator's function from here down */
if (!PyString_Check(value))
{
- PyErr_SetString(PyExc_ValueError, "expected the string name of the action");
+ PyErr_SetString(PyExc_ValueError, "actuator.action = val: Shape Action Actuator, expected the string name of the action");
return -1;
}
@@ -881,7 +881,7 @@ int BL_ShapeActionActuator::pyattr_set_action(void *self_v, const KX_PYATTRIBUTE
action= (bAction*)SCA_ILogicBrick::m_sCurrentLogicManager->GetActionByName(val);
if (action==NULL)
{
- PyErr_SetString(PyExc_ValueError, "action not found!");
+ PyErr_SetString(PyExc_ValueError, "actuator.action = val: Shape Action Actuator, action not found!");
return 1;
}
}
diff --git a/source/gameengine/Converter/BL_ShapeActionActuator.h b/source/gameengine/Converter/BL_ShapeActionActuator.h
index 716d8c9995b..3bc35ac9495 100644
--- a/source/gameengine/Converter/BL_ShapeActionActuator.h
+++ b/source/gameengine/Converter/BL_ShapeActionActuator.h
@@ -144,7 +144,7 @@ public:
case ACT_ACTION_FROM_PROP:
return 0;
default:
- PyErr_SetString(PyExc_ValueError, "invalid type supplied");
+ PyErr_SetString(PyExc_ValueError, "Shape Action Actuator, invalid play type supplied");
return 1;
}