[Bf-blender-cvs] [f0149bc0705] blender2.8: gpu.batch module: keep shader reference in batch.
mano-wii
noreply at git.blender.org
Thu Sep 20 21:38:54 CEST 2018
Commit: f0149bc0705051888b057f8ae423cef14c46a50e
Author: mano-wii
Date: Thu Sep 20 16:38:43 2018 -0300
Branches: blender2.8
https://developer.blender.org/rBf0149bc0705051888b057f8ae423cef14c46a50e
gpu.batch module: keep shader reference in batch.
===================================================================
M source/blender/python/gpu/gpu_py_batch.c
===================================================================
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;
}
More information about the Bf-blender-cvs
mailing list