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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-03-29 21:44:14 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2009-03-29 21:44:14 +0400
commit68e088f1cf3e3b8daa4a5d17acb6f0525ca6de95 (patch)
treea7b25263104f72f16d340119a09fcbcf29f8e695 /source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
parentd79ddebaaec697e1775a6f652a1ee064eb053bf4 (diff)
Improvements on error handling in the Python API.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_StrokeShader.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_StrokeShader.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
index 6560bda3167..f18620888f0 100644
--- a/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
+++ b/source/blender/freestyle/intern/python/BPy_StrokeShader.cpp
@@ -285,10 +285,8 @@ PyObject * StrokeShader_getName( BPy_StrokeShader *self, PyObject *args)
PyObject *StrokeShader_shade( BPy_StrokeShader *self , PyObject *args) {
PyObject *py_s = 0;
- if(!( PyArg_ParseTuple(args, "O", &py_s) && BPy_Stroke_Check(py_s) )) {
- cout << "ERROR: StrokeShader_shade" << endl;
- Py_RETURN_NONE;
- }
+ if(!( PyArg_ParseTuple(args, "O!", &Stroke_Type, &py_s) ))
+ return NULL;
self->ss->shade(*( ((BPy_Stroke *) py_s)->s ));