From 80c009721004b1d436c1892ed4705592c8dd63b0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 16 May 2015 06:18:04 +1000 Subject: Only initialize icons in background mode. Also enable this for headless builds too. Calling UI_icons_init would initialize matcaps, brushes etc... --- source/blender/windowmanager/intern/wm_init_exit.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 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 8778929ae08..c7544f21372 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -58,6 +58,7 @@ #include "BKE_screen.h" #include "BKE_DerivedMesh.h" #include "BKE_global.h" +#include "BKE_icons.h" #include "BKE_library.h" #include "BKE_main.h" #include "BKE_mball_tessellate.h" @@ -179,11 +180,17 @@ 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(); + } + else { + /* 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. + * Called from 'UI_init' above */ + BKE_icons_init(1); } - /* 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(); -- cgit v1.2.3