fix for error in gpu.export_shader() was missing *4 (only writing 1/4 of the colorband)
authorCampbell Barton <ideasman42@gmail.com>
Fri, 28 Oct 2011 08:53:00 +0000 (08:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 28 Oct 2011 08:53:00 +0000 (08:53 +0000)
source/blender/python/intern/gpu.c

index 238558b..1162491 100644 (file)
@@ -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);