diff options
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index 18f0f81b0ec..65d80283fca 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -277,8 +277,9 @@ static PyObject *StrokeVertex_point_get(BPy_StrokeVertex *self, void *UNUSED(clo static int StrokeVertex_point_set(BPy_StrokeVertex *self, PyObject *value, void *UNUSED(closure)) { float v[2]; - if (!float_array_from_PyObject(value, v, 2)) { - PyErr_SetString(PyExc_ValueError, "value must be a 2-dimensional vector"); + if (mathutils_array_parse(v, 2, 2, value, + "value must be a 2-dimensional vector") == -1) + { return -1; } self->sv->setX(v[0]); |