diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-14 10:50:01 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-14 10:59:26 +0300 |
commit | 14b0f203744027451533f563c5d7373b73e070e0 (patch) | |
tree | f5190a031d6b52fdb2d07bdedef6ef652983a6ae /release/scripts/modules/bpy/utils | |
parent | c207f7c22e1439e0b285fba5d2c072bdae23f981 (diff) |
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.
Diffstat (limited to 'release/scripts/modules/bpy/utils')
-rw-r--r-- | release/scripts/modules/bpy/utils/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
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()) |