Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2009-11-29 03:53:23 +0300
committerJoseph Eagar <joeedh@gmail.com>2009-11-29 03:53:23 +0300
commitabd16aac5af56a37a3435b94039d77b74223abab (patch)
tree47ba926d0e8e2c3a903a5d2f1b8290d274cb381c /source/creator
parent3d0db91f820a509bc6c93718499ffe8ff49515d3 (diff)
parentd459c9c9abd2ad0819e5c096f6e3e5a93a02a219 (diff)
ok, apparently didn't commit this either. apparently includes a merge with trunk/2.5 at r24811 I thought I'd committed but did not, yeek.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c50
1 files changed, 41 insertions, 9 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index bd79aa9f036..33e89962fe5 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -296,7 +296,7 @@ int main(int argc, char **argv)
{
SYS_SystemHandle syshandle;
bContext *C= CTX_create();
- int a, i, stax, stay, sizx, sizy /*XXX, scr_init = 0*/;
+ int a, i, stax, stay, sizx, sizy /*XXX, scr_init = 0*/, file_loaded= 0;
int no_handler = 0;
#ifdef WITH_BINRELOC
br_init( NULL );
@@ -515,12 +515,14 @@ int main(int argc, char **argv)
}
}
+ WM_init(C);
+
#ifndef DISABLE_PYTHON
+ BPY_set_context(C); /* necessary evil */
BPY_start_python(argc, argv);
+ BPY_load_user_modules(C);
#endif
- WM_init(C);
-
// XXX BRECHT SOLVE
BLI_where_is_temp( btempdir, 1 ); /* call after loading the .B.blend so we can read U.tempdir */
@@ -534,8 +536,31 @@ int main(int argc, char **argv)
#endif
}
else {
+ for(a=1; a<argc; a++) {
+ if(argv[a][0] == '-') {
+ switch(argv[a][1]) {
+ case 'd':
+ G.f |= G_DEBUG; /* std output printf's */
+ printf ("Blender %d.%02d (sub %d) Build\n", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION);
+ MEM_set_memory_debug();
+#ifdef NAN_BUILDINFO
+ printf("Build: %s %s %s %s\n", build_date, build_time, build_platform, build_type);
+
+#endif // NAN_BUILDINFO
+ for (i = 0; i < argc; i++) {
+ printf("argv[%d] = %s\n", i, argv[i]);
+ }
+ break;
+ }
+ }
+ }
+
+ WM_init(C);
+
#ifndef DISABLE_PYTHON
+ BPY_set_context(C); /* necessary evil */
BPY_start_python(argc, argv);
+ BPY_load_user_modules(C);
#endif
BLI_where_is_temp( btempdir, 0 ); /* call after loading the .B.blend so we can read U.tempdir */
}
@@ -548,15 +573,13 @@ int main(int argc, char **argv)
* Update: now this function also inits the bpymenus, which also depend
* on U.pythondir.
*/
- BPY_post_start_python();
- if(!G.background)
- BPY_run_ui_scripts(C, 0); /* dont need to reload the first time */
+ // TODO - U.pythondir
+
#endif
CTX_py_init_set(C, 1);
- if(!G.background)
- WM_keymap_init(C); /* after BPY_run_ui_scripts() */
+ WM_keymap_init(C);
#ifdef WITH_QUICKTIME
@@ -869,7 +892,11 @@ int main(int argc, char **argv)
/*we successfully loaded a blend file, get sure that
pointcache works */
- if (retval!=0) G.relbase_valid = 1;
+ if (retval!=0) {
+ CTX_wm_manager_set(C, NULL); /* remove wm to force check */
+ WM_check(C);
+ G.relbase_valid = 1;
+ }
/* happens for the UI on file reading too (huh? (ton))*/
// XXX BKE_reset_undo();
@@ -879,6 +906,8 @@ int main(int argc, char **argv)
a file - this should do everything a 'load file' does */
WM_read_file(C, filename, NULL);
}
+
+ file_loaded = 1;
}
}
@@ -887,9 +916,12 @@ int main(int argc, char **argv)
WM_exit(C);
}
+ if(!G.background && !file_loaded)
+ WM_init_splash(C);
WM_main(C);
+
/*XXX if (scr_init==0) {
main_init_screen();
}