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:
authorGermano Cavalcante <mano-wii>2021-03-01 23:35:10 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-03-01 23:38:57 +0300
commit6c6b1c015c570e728b007cd94723eb2c711bec4b (patch)
treec40229a8009a9501acad51b91f09a87d0a4e4914 /source/blender/python/gpu/gpu_py_api.c
parentf39143bc2ed4eb33bb85a3d923cb457384141bf8 (diff)
GPU Python: Implement gpu.texture.from_image
It can be useful to replace `image.bindcode` and `image.gl_load`. Used for example in https://docs.blender.org/api/current/gpu.html#d-image Reviewed By: brecht Differential Revision: https://developer.blender.org/D10458
Diffstat (limited to 'source/blender/python/gpu/gpu_py_api.c')
-rw-r--r--source/blender/python/gpu/gpu_py_api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/python/gpu/gpu_py_api.c b/source/blender/python/gpu/gpu_py_api.c
index 68f7eb9816c..0bc18e73d0c 100644
--- a/source/blender/python/gpu/gpu_py_api.c
+++ b/source/blender/python/gpu/gpu_py_api.c
@@ -73,6 +73,9 @@ PyObject *BPyInit_gpu(void)
PyModule_AddObject(mod, "state", (submodule = bpygpu_state_init()));
PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule);
+ PyModule_AddObject(mod, "texture", (submodule = bpygpu_texture_init()));
+ PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule);
+
return mod;
}