[Bf-blender-cvs] [50b0503a110] blender-v3.0-release: Revert "Fix T92464: Operators fail after opening blend files via an operator"

Campbell Barton noreply at git.blender.org
Fri Nov 5 03:39:46 CET 2021


Commit: 50b0503a110b8159fe7a30645d7a2ebbf518860f
Author: Campbell Barton
Date:   Fri Nov 5 13:26:25 2021 +1100
Branches: blender-v3.0-release
https://developer.blender.org/rB50b0503a110b8159fe7a30645d7a2ebbf518860f

Revert "Fix T92464: Operators fail after opening blend files via an operator"

This reverts commit 9bd97e62ade417f6b4025acbad46802c3e7e5683.

This caused T92818.

Event handling relies on checking for NULL window to detect file load in
enough different areas of the code that this isn't a practical solution.

Revert this change in favor of an alternative approach.

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

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 ff9b56d7859..67222cc07f9 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -769,18 +769,6 @@ static void wm_file_read_post(bContext *C, const struct wmFileReadPost_Params *p
       WM_toolsystem_init(C);
     }
   }
-
-  /* Keep last. */
-  if (use_data) {
-    if (!G.background) {
-      /* Special case, when calling indirectly (from a Python script for example),
-       * the event loop wont run again to set the active window.
-       * Set the window here to allow scripts to continue running other operations, see: T92464. */
-      if (wm->op_undo_depth > 0) {
-        CTX_wm_window_set(C, wm->windows.first);
-      }
-    }
-  }
 }
 
 /** \} */



More information about the Bf-blender-cvs mailing list