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:
Diffstat (limited to 'source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp')
-rw-r--r--source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
index d20fbeab1ec..e61179eb901 100644
--- a/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
+++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_CalligraphicShader.cpp
@@ -105,9 +105,12 @@ int CalligraphicShader___init__( BPy_CalligraphicShader* self, PyObject *args)
PyObject *obj3 = 0, *obj4 = 0;
- if(!( PyArg_ParseTuple(args, "ddOO", &d1, &d2, &obj3, &obj4)
- && PyList_Check(obj3) && PyList_Size(obj3) > 1 && PyBool_Check(obj4) )) {
- cout << "ERROR: CalligraphicShader___init__" << endl;
+ if(!( PyArg_ParseTuple(args, "ddO!O!", &d1, &d2, &PyList_Type, &obj3, &PyBool_Type, &obj4) ))
+ return -1;
+ if( PyList_Size(obj3) != 2 ) {
+ stringstream msg("CalligraphicShader() accepts a list of 2 elements (");
+ msg << PyList_Size(obj3) << " found)";
+ PyErr_SetString(PyExc_TypeError, msg.str().c_str());
return -1;
}