Get scripts from either Resources or Preferences

We must retain the old directory for legacy. People might still have scripts there.
This commit is contained in:
Ghostkeeper 2018-03-12 09:48:03 +01:00
parent a3efbc70fb
commit d98cab48ac
No known key found for this signature in database
GPG Key ID: 5252B696FB5E7C7A

View File

@ -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: