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:
Diffstat (limited to 'source/blender/python/intern/gpu.c')
-rw-r--r--source/blender/python/intern/gpu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c
index 26e3bde57a3..e4580e8035b 100644
--- a/source/blender/python/intern/gpu.c
+++ b/source/blender/python/intern/gpu.c
@@ -40,7 +40,6 @@
#include <Python.h>
#include "DNA_scene_types.h"
-#include "DNA_image_types.h"
#include "DNA_material_types.h"
#include "DNA_ID.h"
#include "DNA_customdata_types.h"
@@ -200,7 +199,7 @@ static PyObject *GPU_export_shader(PyObject *UNUSED(self), PyObject *args, PyObj
if (shader->vertex) {
PY_DICT_ADD_STRING(result, shader, vertex);
}
- seq = PyList_New(BLI_countlist(&shader->uniforms));
+ seq = PyList_New(BLI_listbase_count(&shader->uniforms));
for (i = 0, uniform = shader->uniforms.first; uniform; uniform = uniform->next, i++) {
dict = PyDict_New();
PY_DICT_ADD_STRING(dict, uniform, varname);
@@ -229,7 +228,7 @@ static PyObject *GPU_export_shader(PyObject *UNUSED(self), PyObject *args, PyObj
PyDict_SetItemString(result, "uniforms", seq);
Py_DECREF(seq);
- seq = PyList_New(BLI_countlist(&shader->attributes));
+ seq = PyList_New(BLI_listbase_count(&shader->attributes));
for (i = 0, attribute = shader->attributes.first; attribute; attribute = attribute->next, i++) {
dict = PyDict_New();
PY_DICT_ADD_STRING(dict, attribute, varname);