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:
authorAndrea Weikert <elubie@gmx.net>2007-11-24 20:08:40 +0300
committerAndrea Weikert <elubie@gmx.net>2007-11-24 20:08:40 +0300
commita0658707e12869c3a54c68c2261517d5b4a2242e (patch)
tree5abd953714937158eca59d091a6f1a77ca34883a /source/creator
parentaf26256da477025d95af5138809d5d07f124d37d (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.c20
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]);
+ }
}
}