From 14b0f203744027451533f563c5d7373b73e070e0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 14 Sep 2020 17:50:01 +1000 Subject: Fix T80694: Crash reloading scripts from the Python console Running `bpy.ops.script.reload()` from Python was crashing since the operator being called was it's self freed. Change the reload operator to defer execution - as supporting re-registration during execution is quite involved for a corner-case. --- release/scripts/modules/bpy/utils/__init__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/modules') diff --git a/release/scripts/modules/bpy/utils/__init__.py b/release/scripts/modules/bpy/utils/__init__.py index 8a67a598ccd..4e0220ee1cc 100644 --- a/release/scripts/modules/bpy/utils/__init__.py +++ b/release/scripts/modules/bpy/utils/__init__.py @@ -283,6 +283,8 @@ def load_scripts(reload_scripts=False, refresh_scripts=False): del _initialize if reload_scripts: + _bpy.context.window_manager.tag_script_reload() + import gc print("gc.collect() -> %d" % gc.collect()) -- cgit v1.2.3