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>2019-02-08 00:36:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-08 00:42:50 +0300
commit7fdda18ca1317d9c911ce279a7c261eff9c75709 (patch)
treed9a48c7cab189603e0649dd6b752cde046f8a9ce
parent0abf754748cbab97749acb581aceca4ba9315ac5 (diff)
Remove "Keep Session" preference
As far as we know this wasn't widely used, and relied no storing data in the temp dir which may be cleared on reboot. More generally, alternative behavior for a core area like file IO is not something to keep if it has unresolved issues. See D4310 for details.
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py1
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c5
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c9
-rw-r--r--source/creator/creator.c7
5 files changed, 3 insertions, 21 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 8dd02baf91d..2570930c457 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1282,7 +1282,6 @@ class USERPREF_PT_saveload_blend_autosave(PreferencePanel):
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
- flow.prop(paths, "use_keep_session")
flow.prop(paths, "use_auto_save_temporary_files")
sub = flow.column()
sub.active = paths.use_auto_save_temporary_files
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 228812cd243..29b0dae275d 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -901,7 +901,7 @@ typedef enum eUserpref_UI_Flag {
/** #UserDef.uiflag2 */
typedef enum eUserpref_UI_Flag2 {
- USER_KEEP_SESSION = (1 << 0),
+ // USER_FLAG2_DEPRECATED = (1 << 0), /* TODO: clear */
USER_REGION_OVERLAP = (1 << 1),
USER_TRACKPAD_NATURAL = (1 << 2),
} eUserpref_UI_Flag2;
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index b2536ba5cfa..d11d1f7d515 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4983,11 +4983,6 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
"The time (in minutes) to wait between automatic temporary saves");
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
- prop = RNA_def_property(srna, "use_keep_session", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", USER_KEEP_SESSION);
- RNA_def_property_ui_text(prop, "Keep Session",
- "Always load session recovery and save it after quitting Blender");
-
prop = RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 30);
RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember");
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 83d3e8a75e3..2115a7d661a 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -312,12 +312,7 @@ void WM_init(bContext *C, int argc, const char **argv)
}
#endif
- /* load last session, uses regular file reading so it has to be in end (after init py etc) */
- if (U.uiflag2 & USER_KEEP_SESSION) {
- /* calling WM_recover_last_session(C, NULL) has been moved to creator.c */
- /* that prevents loading both the kept session, and the file on the command line */
- }
- else {
+ {
Main *bmain = CTX_data_main(C);
/* note, logic here is from wm_file_read_post,
* call functions that depend on Python being initialized. */
@@ -430,7 +425,7 @@ void WM_exit_ext(bContext *C, const bool do_python)
if (!G.background) {
struct MemFile *undo_memfile = wm->undo_stack ? ED_undosys_stack_memfile_get_active(wm->undo_stack) : NULL;
- if ((U.uiflag2 & USER_KEEP_SESSION) || (undo_memfile != NULL)) {
+ if (undo_memfile != NULL) {
/* save the undo state as quit.blend */
Main *bmain = CTX_data_main(C);
char filename[FILE_MAX];
diff --git a/source/creator/creator.c b/source/creator/creator.c
index b20f5cdb52f..fbe3ceb1d29 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -467,13 +467,6 @@ int main(
/* OK we are ready for it */
#ifndef WITH_PYTHON_MODULE
main_args_setup_post(C, ba);
-
- if (G.background == 0) {
- if (!G.file_loaded)
- if (U.uiflag2 & USER_KEEP_SESSION)
- WM_recover_last_session(C, NULL);
- }
-
#endif
/* Explicitly free data allocated for argument parsing: