From 565fcd8907c4cbd105bef9330e13ccbd893a6f3e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 28 Oct 2011 08:53:00 +0000 Subject: fix for error in gpu.export_shader() was missing *4 (only writing 1/4 of the colorband) --- source/blender/python/intern/gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c index 238558b7ad7..1162491ee26 100644 --- a/source/blender/python/intern/gpu.c +++ b/source/blender/python/intern/gpu.c @@ -236,7 +236,7 @@ static PyObject* GPU_export_shader(PyObject* UNUSED(self), PyObject *args, PyObj PY_DICT_ADD_LONG(dict,uniform,texnumber); } if (uniform->texpixels) { - val = PyByteArray_FromStringAndSize((const char *)uniform->texpixels, uniform->texsize); + val = PyByteArray_FromStringAndSize((const char *)uniform->texpixels, uniform->texsize * 4); PyDict_SetItemString(dict, "texpixels", val); Py_DECREF(val); PY_DICT_ADD_LONG(dict,uniform,texsize); -- cgit v1.2.3