From d98cab48ac464664da24510d981fa560ebbda4ad Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 12 Mar 2018 09:48:03 +0100 Subject: [PATCH] Get scripts from either Resources or Preferences We must retain the old directory for legacy. People might still have scripts there. --- plugins/PostProcessingPlugin/PostProcessingPlugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index dc2d93a788..c4b760724b 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -173,7 +173,10 @@ class PostProcessingPlugin(QObject, Extension): Logger.log("d", "Creating post processing plugin view.") ## Load all scripts in the scripts folders - for root in [PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"), Resources.getStoragePath(Resources.Resources)]: + # The PostProcessingPlugin path is for built-in scripts. + # The Resources path is where the user should store custom scripts. + # The Preferences path is legacy, where the user may previously have stored scripts. + for root in [PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"), Resources.getStoragePath(Resources.Resources), Resources.getStoragePath(Resources.Preferences)]: path = os.path.join(root, "scripts") if not os.path.isdir(path): try: