diff options
author | Germano Cavalcante <mano-wii> | 2021-05-14 17:15:00 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-05-14 18:26:40 +0300 |
commit | 48fa029dd11bb09d4aca8e0a420781e3ec07a3a2 (patch) | |
tree | 7ea87a8fb24dc7201fb1a2a52a681973a9c0d46e /source/blender/python/gpu/gpu_py_api.c | |
parent | 3f4f109646059ee0780bb40dbd65b3bc8c3a8f3f (diff) |
Python GPU: New 'platform' module
This module exposes the platform utils defined in the GPU module in C.
This will be useful for porting existing code with `bgl` to `gpu`.
Reviewed By: fclem, brecht, campbellbarton
Maniphest Tasks: T80730
Part of D11147
Diffstat (limited to 'source/blender/python/gpu/gpu_py_api.c')
-rw-r--r-- | source/blender/python/gpu/gpu_py_api.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/gpu/gpu_py_api.c b/source/blender/python/gpu/gpu_py_api.c index 18e5fa41c44..5119b3612f8 100644 --- a/source/blender/python/gpu/gpu_py_api.c +++ b/source/blender/python/gpu/gpu_py_api.c @@ -32,6 +32,7 @@ #include "gpu_py_capabilities.h" #include "gpu_py_matrix.h" +#include "gpu_py_platform.h" #include "gpu_py_select.h" #include "gpu_py_state.h" #include "gpu_py_types.h" @@ -68,6 +69,9 @@ PyObject *BPyInit_gpu(void) PyModule_AddObject(mod, "matrix", (submodule = bpygpu_matrix_init())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); + PyModule_AddObject(mod, "platform", (submodule = bpygpu_platform_init())); + PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); + PyModule_AddObject(mod, "select", (submodule = bpygpu_select_init())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); |