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:
authorTon Roosendaal <ton@blender.org>2013-04-13 16:03:20 +0400
committerTon Roosendaal <ton@blender.org>2013-04-13 16:03:20 +0400
commitd867cefa32ca3b26bbfc279e2f04d4f795dc13a4 (patch)
tree6c96c71400ffc5da4a8b48e2ff456e13af4f81ab /source/creator
parent9eea6c7057c6e092a5e29e6a595c7dc7d0f14072 (diff)
Bug fix #34896
The feature "Keep Session" was also loading that session when you double-click on a .blend to open it, or when a .blend file was on commandline. Moved this feature to the main() in creator.c, so it can check on it properly, skipping the kept session when a file was loaded.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index cea32a8b171..aecff4c9e03 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -1196,6 +1196,11 @@ static int set_addons(int argc, const char **argv, void *data)
}
}
+static int test_file(int UNUSED(argc), const char **argv, void *data)
+{
+ printf("path is %s\n", argv[0]);
+}
+
static int load_file(int UNUSED(argc), const char **argv, void *data)
{
bContext *C = data;
@@ -1604,6 +1609,13 @@ int main(int argc, const char **argv)
/* OK we are ready for it */
#ifndef WITH_PYTHON_MODULE
BLI_argsParse(ba, 4, load_file, C);
+
+ if (G.background == 0) {
+ if (!G.file_loaded)
+ if (U.uiflag2 & USER_KEEP_SESSION)
+ WM_recover_last_session(C, NULL);
+ }
+
#endif
#ifndef WITH_PYTHON_MODULE