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.
This commit is contained in:
@@ -17,6 +17,7 @@ set(INC_SYS
|
||||
)
|
||||
|
||||
set(SRC
|
||||
bgl.c
|
||||
bl_math_py_api.c
|
||||
blf_py_api.c
|
||||
bpy_threads.c
|
||||
@@ -26,6 +27,7 @@ set(SRC
|
||||
py_capi_rna.c
|
||||
py_capi_utils.c
|
||||
|
||||
bgl.h
|
||||
bl_math_py_api.h
|
||||
blf_py_api.h
|
||||
idprop_py_api.h
|
||||
@@ -38,14 +40,6 @@ set(SRC
|
||||
python_utildefines.h
|
||||
)
|
||||
|
||||
if(WITH_OPENGL)
|
||||
list(APPEND SRC
|
||||
bgl.c
|
||||
|
||||
bgl.h
|
||||
)
|
||||
endif()
|
||||
|
||||
set(LIB
|
||||
${GLEW_LIBRARY}
|
||||
${PYTHON_LINKFLAGS}
|
||||
|
||||
Reference in New Issue
Block a user