diff options
author | Campbell Barton <campbell@blender.org> | 2022-07-16 10:28:09 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-07-16 10:30:17 +0300 |
commit | 0a8d21e0c96e2f9c7f6f990d756f5abe011ed805 (patch) | |
tree | c034a7814b53d4c425c8d2435c2be38fa57b45e4 /source/blender/python/intern/bpy_interface.c | |
parent | 49babc7caa82883fa891640406da89b68ae8d8e5 (diff) |
PyAPI: re-enable the "bgl" module for headless builds
Instead of removing the `bgl` module, set all it's functions to stubs
so importing `bgl` or any of it's members doesn't raise an error.
This avoids problems for scripts that import bgl but don't call it's
functions when running in background mode.
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 08dd5fe9cfc..939fa475344 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -259,9 +259,7 @@ static struct _inittab bpy_internal_modules[] = { {"mathutils.kdtree", PyInit_mathutils_kdtree}, #endif {"_bpy_path", BPyInit__bpy_path}, -#ifdef WITH_OPENGL {"bgl", BPyInit_bgl}, -#endif {"blf", BPyInit_blf}, {"bl_math", BPyInit_bl_math}, {"imbuf", BPyInit_imbuf}, |