mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Only check for loaded plug-ins at initial call to loadAllScripts
Not for every call to loadScripts.
This commit is contained in:
parent
14936fdf21
commit
e2724f53ad
1 changed files with 4 additions and 5 deletions
|
@ -116,9 +116,11 @@ class PostProcessingPlugin(QObject, Extension):
|
||||||
|
|
||||||
## Load all scripts from all paths where scripts can be found.
|
## Load all scripts from all paths where scripts can be found.
|
||||||
#
|
#
|
||||||
# This should probably only be done on init, but it can be used to update
|
# This should probably only be done on init.
|
||||||
# the scripts list from files just as well.
|
|
||||||
def loadAllScripts(self):
|
def loadAllScripts(self):
|
||||||
|
if self._loaded_scripts: #Already loaded.
|
||||||
|
return
|
||||||
|
|
||||||
#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.
|
||||||
|
@ -137,9 +139,6 @@ class PostProcessingPlugin(QObject, Extension):
|
||||||
# This should probably only be done on init.
|
# This should probably only be done on init.
|
||||||
# \param path Path to check for scripts.
|
# \param path Path to check for scripts.
|
||||||
def loadScripts(self, path):
|
def loadScripts(self, path):
|
||||||
if self._loaded_scripts: #Already loaded.
|
|
||||||
return
|
|
||||||
|
|
||||||
## Load all scripts in the scripts folders
|
## Load all scripts in the scripts folders
|
||||||
scripts = pkgutil.iter_modules(path = [path])
|
scripts = pkgutil.iter_modules(path = [path])
|
||||||
for loader, script_name, ispkg in scripts:
|
for loader, script_name, ispkg in scripts:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue