[Bf-blender-cvs] [b931afe] master: Fix new 'custom previews/icons' py feature crashing in background mode.

Bastien Montagne noreply at git.blender.org
Fri May 15 20:13:39 CEST 2015


Commit: b931afe55e4f07e8d1d92cc2049467a96a0c5345
Author: Bastien Montagne
Date:   Fri May 15 20:12:25 2015 +0200
Branches: master
https://developer.blender.org/rBb931afe55e4f07e8d1d92cc2049467a96a0c5345

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...

===================================================================

M	source/blender/windowmanager/intern/wm_init_exit.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 77d3e37..8778929 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




More information about the Bf-blender-cvs mailing list