[Bf-blender-cvs] [642b19c8b8a] master: Fix app-templates not resetting the user interface

Campbell Barton noreply at git.blender.org
Fri Jun 19 06:35:23 CEST 2020


Commit: 642b19c8b8a501c6a0f4b0ae36daef304bfd8ee1
Author: Campbell Barton
Date:   Fri Jun 19 14:05:18 2020 +1000
Branches: master
https://developer.blender.org/rB642b19c8b8a501c6a0f4b0ae36daef304bfd8ee1

Fix app-templates not resetting the user interface

Regression in 45b5f4e3dff75

===================================================================

M	source/blender/windowmanager/intern/wm_files.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index b2753886f69..055724926f2 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -905,6 +905,13 @@ void wm_homefile_read(bContext *C,
     SET_FLAG_FROM_TEST(G.f, (U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0, G_FLAG_SCRIPT_AUTOEXEC);
   }
 
+  if (use_data) {
+    if (reset_app_template) {
+      /* Always load UI when switching to another template. */
+      G.fileflags &= ~G_FILE_NO_UI;
+    }
+  }
+
   if (use_userdef || reset_app_template) {
 #ifdef WITH_PYTHON
     /* This only runs once Blender has already started. */
@@ -1109,13 +1116,6 @@ void wm_homefile_read(bContext *C,
     BLI_strncpy(U.app_template, app_template_override, sizeof(U.app_template));
   }
 
-  if (use_data) {
-    if (reset_app_template) {
-      /* Always load UI when switching to another template. */
-      G.fileflags &= ~G_FILE_NO_UI;
-    }
-  }
-
   bmain = CTX_data_main(C);
 
   if (use_userdef) {



More information about the Bf-blender-cvs mailing list