Merge branch 'fix_postprocessing_script_roots' of https://github.com/fieldOfView/Cura

This commit is contained in:
Jaime van Kessel 2021-02-12 16:29:28 +01:00
commit d24bbc4071
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -142,7 +142,9 @@ class PostProcessingPlugin(QObject, Extension):
# The PostProcessingPlugin path is for built-in scripts. # The PostProcessingPlugin path is for built-in scripts.
# The Resources path is where the user should store custom 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. # 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)]: resource_folders = [PluginRegistry.getInstance().getPluginPath("PostProcessingPlugin"), Resources.getStoragePath(Resources.Preferences)]
resource_folders.extend(Resources.getAllPathsForType(Resources.Resources))
for root in resource_folders:
if root is None: if root is None:
continue continue
path = os.path.join(root, "scripts") path = os.path.join(root, "scripts")