diff options
author | Andrea Weikert <elubie@gmx.net> | 2007-11-24 20:08:40 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2007-11-24 20:08:40 +0300 |
commit | a0658707e12869c3a54c68c2261517d5b4a2242e (patch) | |
tree | 5abd953714937158eca59d091a6f1a77ca34883a /source/creator | |
parent | af26256da477025d95af5138809d5d07f124d37d (diff) |
Bugfix #7804 : Opened file is not registered correctly when started from command line
- treat file passed as parameter the same as if loaded from UI if Blender isn't running in background mode.
- only set relative base as valid if file loaded successfully.
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/creator.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 8588dc9db9c..1feaf075e1c 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -686,13 +686,19 @@ int main(int argc, char **argv) break; } } - else { - BKE_read_file(argv[a], NULL); - sound_initialize_sounds(); - - /* happens for the UI on file reading too */ - BKE_reset_undo(); - BKE_write_undo("original"); /* save current state */ + else { + if (G.background) { + BKE_read_file(argv[a], NULL); + sound_initialize_sounds(); + + /* happens for the UI on file reading too */ + BKE_reset_undo(); + BKE_write_undo("original"); /* save current state */ + } else { + /* we are not running in background mode here, but start blender in UI mode with + a file - this should do everything a 'load file' does */ + BIF_read_file(argv[a]); + } } } |