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:
authormano-wii <germano.costa@ig.com.br>2018-09-20 22:38:43 +0300
committermano-wii <germano.costa@ig.com.br>2018-09-20 22:38:43 +0300
commitf0149bc0705051888b057f8ae423cef14c46a50e (patch)
tree19c1c3a3fc969015916201887faf425053f05403 /source/blender/python/gpu/gpu_py_batch.c
parent9fb9604c1929a224254ba08975e4d250880e0edf (diff)
gpu.batch module: keep shader reference in batch.
Diffstat (limited to 'source/blender/python/gpu/gpu_py_batch.c')
-rw-r--r--source/blender/python/gpu/gpu_py_batch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/gpu/gpu_py_batch.c b/source/blender/python/gpu/gpu_py_batch.c
index 4e6df73a2d9..2a4868d61d0 100644
--- a/source/blender/python/gpu/gpu_py_batch.c
+++ b/source/blender/python/gpu/gpu_py_batch.c
@@ -170,6 +170,11 @@ static PyObject *bpygpu_VertBatch_program_set(BPyGPUBatch *self, BPyGPUShader *p
GPU_shader_get_program(shader),
GPU_shader_get_interface(shader));
+#ifdef USE_GPU_PY_REFERENCES
+ /* Hold user */
+ PyList_Append(self->references, (PyObject *)py_shader);
+#endif
+
Py_RETURN_NONE;
}