diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-22 13:02:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-22 13:02:41 +0300 |
commit | c12e1a09ec7e76455d81fe4114e91a1561cbdb6d (patch) | |
tree | cb6fb333f48f0e04a102cccd558377e649409db8 /source/blender/python/generic | |
parent | a9729e6d75c74f48c6135df710f117435e7ff2f3 (diff) |
BLF: use float vector passing color args
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/blf_py_api.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c index 0dfff9b4a7b..69f1e297b43 100644 --- a/source/blender/python/generic/blf_py_api.c +++ b/source/blender/python/generic/blf_py_api.c @@ -332,17 +332,21 @@ PyDoc_STRVAR(py_blf_shadow_doc, static PyObject *py_blf_shadow(PyObject *UNUSED(self), PyObject *args) { int level, fontid; - float r, g, b, a; + float rgba[4]; - if (!PyArg_ParseTuple(args, "iiffff:blf.shadow", &fontid, &level, &r, &g, &b, &a)) + if (!PyArg_ParseTuple( + args, "iiffff:blf.shadow", + &fontid, &level, &rgba[0], &rgba[1], &rgba[2], &rgba[3])) + { return NULL; + } if (level != 0 && level != 3 && level != 5) { PyErr_SetString(PyExc_TypeError, "blf.shadow expected arg to be in (0, 3, 5)"); return NULL; } - BLF_shadow(fontid, level, r, g, b, a); + BLF_shadow(fontid, level, rgba); Py_RETURN_NONE; } |