From fcb534e336c3b9d9065c5bbc9143bcc305497975 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 12 Jun 2019 12:21:21 +1000 Subject: UI: alternate fix for T65702, handling of auto-saving userprefs The behavior for loading factory settings wasn't clear for users. This commit changes the behavior: - Loading factory settings always disables auto-save for the current session. - The internal setting to skip saving on exit is now exposed in the preferences (when enabled). - The menu item "Load Factory Settings (Temporary)" has been removed since it's always temporary. This way users can always reset factory settings without having to consider the combination of options that might cause their preferences to be overwritten at exit. If they want to enable auto-save for the current session this can be done from the preferences. --- source/blender/python/intern/bpy_app.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/python') diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index f0a3c7f4d5f..9ffb4cb4821 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -508,6 +508,12 @@ static PyGetSetDef bpy_app_getsets[] = { (char *)bpy_app_global_flag_doc, (void *)G_FLAG_EVENT_SIMULATE}, + {(char *)"use_userpref_skip_save_on_exit", + bpy_app_global_flag_get, + bpy_app_global_flag_set, + (char *)bpy_app_global_flag_doc, + (void *)G_FLAG_USERPREF_NO_SAVE_ON_EXIT}, + {(char *)"binary_path_python", bpy_app_binary_path_python_get, NULL, -- cgit v1.2.3