From 9141cc6f8cd164ad70e8984fb9621c0042790549 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 28 Nov 2022 07:59:46 +0100 Subject: [PATCH] Fix plugin reload --- source/appModuleHandler.py | 2 ++ source/globalPluginHandler.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/appModuleHandler.py b/source/appModuleHandler.py index 0b715bc27c3..32ea6529a0c 100644 --- a/source/appModuleHandler.py +++ b/source/appModuleHandler.py @@ -341,6 +341,8 @@ def reloadAppModules(): for mod in mods: del sys.modules[mod] import appModules + from addonHandler.packaging import addDirsToPythonPackagePath + addDirsToPythonPackagePath(appModules) initialize() for entry in state: pid = entry.pop("processID") diff --git a/source/globalPluginHandler.py b/source/globalPluginHandler.py index e80f1187fbe..6881755148b 100644 --- a/source/globalPluginHandler.py +++ b/source/globalPluginHandler.py @@ -51,6 +51,8 @@ def reloadGlobalPlugins(): for mod in mods: del sys.modules[mod] import globalPlugins + from addonHandler.packaging import addDirsToPythonPackagePath + addDirsToPythonPackagePath(globalPlugins) initialize() class GlobalPlugin(baseObject.ScriptableObject):