diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-15 23:18:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-15 23:21:26 +0300 |
commit | 80c009721004b1d436c1892ed4705592c8dd63b0 (patch) | |
tree | 5259b8387544c038f87eee14c468e9c7dc8e258e /source/blender/windowmanager | |
parent | b931afe55e4f07e8d1d92cc2049467a96a0c5345 (diff) |
Only initialize icons in background mode.
Also enable this for headless builds too.
Calling UI_icons_init would initialize matcaps, brushes etc...
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 13 |
1 files changed, 10 insertions, 3 deletions
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(); |