diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-05 12:22:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-05 12:22:31 +0300 |
commit | c4d50b9ed4f47c260e33810cb57ba076efab31e4 (patch) | |
tree | eab66a124bd7185ce1b911287e9fafa3acc6bc4e | |
parent | db09b57d4eedd372a5a995c7393ad6356fa734af (diff) | |
parent | da48defcfacd535f21542f40cee4730382ed6b85 (diff) |
Merge branch 'blender-v2.83-release'
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index f2050befac1..446449455dd 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -956,20 +956,20 @@ void wm_homefile_read(bContext *C, } } + if (use_userdef) { + if ((skip_flags & BLO_READ_SKIP_USERDEF) == 0) { + UserDef *userdef_default = BKE_blendfile_userdef_from_defaults(); + BKE_blender_userdef_data_set_and_free(userdef_default); + skip_flags |= BLO_READ_SKIP_USERDEF; + } + } + if (success == false && filepath_startup_override && reports) { /* We can not return from here because wm is already reset */ BKE_reportf(reports, RPT_ERROR, "Could not read '%s'", filepath_startup_override); } if (success == false) { - if (use_userdef) { - if ((skip_flags & BLO_READ_SKIP_USERDEF) == 0) { - UserDef *userdef_default = BKE_blendfile_userdef_from_defaults(); - BKE_blender_userdef_data_set_and_free(userdef_default); - skip_flags |= BLO_READ_SKIP_USERDEF; - } - } - success = BKE_blendfile_read_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, @@ -1959,9 +1959,11 @@ static int wm_homefile_read_exec(bContext *C, wmOperator *op) RNA_property_string_get(op->ptr, prop_app_template, app_template_buf); app_template = app_template_buf; - /* Always load preferences when switching templates with own preferences. */ - use_userdef = BKE_appdir_app_template_has_userpref(app_template) || - BKE_appdir_app_template_has_userpref(U.app_template); + if (!use_factory_settings) { + /* Always load preferences when switching templates with own preferences. */ + use_userdef = BKE_appdir_app_template_has_userpref(app_template) || + BKE_appdir_app_template_has_userpref(U.app_template); + } /* Turn override off, since we're explicitly loading a different app-template. */ WM_init_state_app_template_set(NULL); |