From b931afe55e4f07e8d1d92cc2049467a96a0c5345 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 15 May 2015 20:12:25 +0200 Subject: Fix new 'custom previews/icons' py feature crashing in background mode. We want this even without UI, some scripts may use it in a background processing mode to avoid too heavy process in actual 'user' blender... --- source/blender/windowmanager/intern/wm_init_exit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 77d3e3762a8..8778929ae08 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -179,10 +179,12 @@ void WM_init(bContext *C, int argc, const char **argv) GPU_set_linear_mipmap(true); GPU_set_anisotropic(U.anisotropic_filter); GPU_set_gpu_mipmapping(U.use_gpu_mipmap); - - UI_init(); } + /* Note: Currently only inits icons, which we now want in background mode too (scripts could use those in background + * processing...). In case we do more later, we may need to pass a 'background' flag. */ + UI_init(); + ED_spacemacros_init(); /* note: there is a bug where python needs initializing before loading the -- cgit v1.2.3