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/Interface1D/BPy_Stroke.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
index 7110eef9036..aa8c90cfd24 100644
--- a/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp
@@ -151,10 +151,16 @@ static PyObject *Stroke_resample(BPy_Stroke *self, PyObject *args, PyObject *kwd
float f;
if (PyArg_ParseTupleAndKeywords(args, kwds, "i", (char **)kwlist_1, &i)) {
- self->s->Resample(i);
+ if (self->s->Resample(i) < 0) {
+ PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex count) failed");
+ return NULL;
+ }
}
else if (PyErr_Clear(), PyArg_ParseTupleAndKeywords(args, kwds, "f", (char **)kwlist_2, &f)) {
- self->s->Resample(f);
+ if (self->s->Resample(f) < 0) {
+ PyErr_SetString(PyExc_RuntimeError, "Stroke resampling (by vertex interval) failed");
+ return NULL;
+ }
}
else {
PyErr_SetString(PyExc_TypeError, "invalid argument");