user modules were not loading in background mode.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 27 Apr 2010 21:01:24 +0000 (21:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 27 Apr 2010 21:01:24 +0000 (21:01 +0000)
source/creator/creator.c

index 436275e8c6b328f2a9fb8fa7cee5ab895497b983..6af3775821d848bc44045841cff5ea2ccf4ae08e 100644 (file)
@@ -846,6 +846,12 @@ static int load_file(int argc, char **argv, void *data)
                        if (CTX_wm_manager(C) == NULL) CTX_wm_manager_set(C, wm); /* reset wm */
                }
 
+               /* WM_read_file() runs normally but since we're in background mode do here */
+#ifndef DISABLE_PYTHON
+               /* run any texts that were loaded in and flagged as modules */
+               BPY_load_user_modules(C);
+#endif
+
                /* happens for the UI on file reading too (huh? (ton))*/
        // XXX                  BKE_reset_undo();
        //                              BKE_write_undo("original");     /* save current state */