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:
		@@ -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},
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user