diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-09-20 22:38:43 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-09-20 22:38:43 +0300 |
commit | f0149bc0705051888b057f8ae423cef14c46a50e (patch) | |
tree | 19c1c3a3fc969015916201887faf425053f05403 /source/blender/python/gpu/gpu_py_batch.c | |
parent | 9fb9604c1929a224254ba08975e4d250880e0edf (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.c | 5 |
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; } |