From 161ae41c6d3d63f4b444f83bd6e64f6cbb214983 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 Jan 2010 18:52:03 +0000 Subject: load the user prefs before python so the python userdir is read. --- source/blender/windowmanager/intern/wm_init_exit.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 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 a83b6c3609a..48164b5ac16 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -129,18 +129,23 @@ void WM_init(bContext *C, int argc, char **argv) init_builtin_keyingsets(); /* editors/animation/keyframing.c */ - /* python needs initializing before loading the .B.blend - * because it may contain PyDrivers. It also needs to be after - * initializing space types and other internal data */ + /* get the default database, plus a wm */ + WM_read_homefile(C, NULL); + + /* note: there is a bug where python needs initializing before loading the + * .B25.blend because it may contain PyDrivers. It also needs to be after + * initializing space types and other internal data. + * + * However cant redo this at the moment. Solution is to load python + * before WM_read_homefile() or make py-drivers check if python is running. + * Will try fix when the crash can be repeated. - campbell. */ + #ifndef DISABLE_PYTHON BPY_set_context(C); /* necessary evil */ BPY_start_python(argc, argv); BPY_load_user_modules(C); #endif - /* get the default database, plus a wm */ - WM_read_homefile(C, NULL); - wm_init_reports(C); /* reports cant be initialized before the wm */ if (!G.background) { -- cgit v1.2.3