load the user prefs before python so the python userdir is read.

This commit is contained in:
Campbell Barton
2010-01-18 18:52:03 +00:00
parent 20fb87ac32
commit 161ae41c6d

View File

@@ -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) {