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:
authorCampbell Barton <ideasman42@gmail.com>2021-11-13 06:01:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-11-13 06:05:27 +0300
commitab9ec193c34ae62af99350f62631f91c9648d5eb (patch)
tree6d48f1e419d9d23b38b1d2e6a288201df13c5e7f
parentc4ea5cb1a3811cbf685a1542a69b33ba3d6345f1 (diff)
Fix splash screen showing on startup with files loaded by scripts
Suppressing the splash was only done when passing in an argument from the command line. Remove G.file_loaded, as it is misleading, only set once on startup, replace with G.relbase_valid which is used everywhere else to check if the file path should be used.
-rw-r--r--source/blender/blenkernel/BKE_global.h1
-rw-r--r--source/creator/creator.c3
-rw-r--r--source/creator/creator_args.c2
3 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 1e3fe61552a..4f1da0a972f 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -45,7 +45,6 @@ typedef struct Global {
/** When set: `G_MAIN->name` contains valid relative base path. */
bool relbase_valid;
- bool file_loaded;
bool save_over;
/** Strings of recent opened files. */
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 4171d60b5b6..6daaea38c34 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -551,7 +551,8 @@ int main(int argc,
WM_exit(C);
}
else {
- if (!G.file_loaded) {
+ /* When no file is loaded, show the splash screen. */
+ if (!G.relbase_valid) {
WM_init_splash(C);
}
WM_main(C);
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 943646daa81..896d29e0583 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -2008,8 +2008,6 @@ static int arg_handle_load_file(int UNUSED(argc), const char **argv, void *data)
}
}
- G.file_loaded = 1;
-
return 0;
}