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>2014-06-24 17:48:15 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-06-24 18:13:56 +0400
commit9563bde9a5457a3b04b61b8727d798da3ab689d3 (patch)
tree13d9205314245e57fc62db8af0d5a9457fd45ad6 /source/blender/freestyle/intern/python/BPy_Freestyle.cpp
parent252eaed483ca8c0d89708b3d0a2a82076f944229 (diff)
Freestyle: use mathutils_array_parse() instead of its own helper functions.
Patch contribution by flokkievids (Folkert de Vries). Thanks!
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Freestyle.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index f390e937aac..2cfd3658189 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -138,14 +138,16 @@ static PyObject *Freestyle_blendRamp(PyObject *self, PyObject *args)
PyErr_SetString(PyExc_TypeError, "argument 1 is an unknown ramp blend type");
return NULL;
}
- if (!float_array_from_PyObject(obj1, a, 3)) {
- PyErr_SetString(PyExc_TypeError,
- "argument 2 must be a 3D vector (either a tuple/list of 3 elements or Vector)");
+ if (mathutils_array_parse(a, 3, 3, obj1,
+ "argument 2 must be a 3D vector "
+ "(either a tuple/list of 3 elements or Vector)") == -1)
+ {
return NULL;
}
- if (!float_array_from_PyObject(obj2, b, 3)) {
- PyErr_SetString(PyExc_TypeError,
- "argument 4 must be a 3D vector (either a tuple/list of 3 elements or Vector)");
+ if (mathutils_array_parse(b, 3, 3, obj2,
+ "argument 4 must be a 3D vector "
+ "(either a tuple/list of 3 elements or Vector)") == -1)
+ {
return NULL;
}
ramp_blend(type, a, fac, b);