mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
Merged in feature/PYPE-469_faster_plugins_presets (pull request #263)
Feature/PYPE-469 faster plugins presets Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
commit
2564c708e3
1 changed files with 13 additions and 1 deletions
14
pype/lib.py
14
pype/lib.py
|
|
@ -467,10 +467,18 @@ def filter_pyblish_plugins(plugins):
|
|||
|
||||
host = api.current_host()
|
||||
|
||||
presets = config.get_presets().get('plugins', {}).get(host, {}).get(
|
||||
"publish", {}
|
||||
)
|
||||
|
||||
# iterate over plugins
|
||||
for plugin in plugins[:]:
|
||||
# skip if there are no presets to process
|
||||
if not presets:
|
||||
continue
|
||||
|
||||
try:
|
||||
config_data = config.get_presets()['plugins'][host]["publish"][plugin.__name__] # noqa: E501
|
||||
config_data = presets[plugin.__name__] # noqa: E501
|
||||
except KeyError:
|
||||
continue
|
||||
|
||||
|
|
@ -483,3 +491,7 @@ def filter_pyblish_plugins(plugins):
|
|||
option, value, plugin.__name__))
|
||||
|
||||
setattr(plugin, option, value)
|
||||
|
||||
# Remove already processed plugins from dictionary
|
||||
# WARNING Requires plugins with unique names
|
||||
presets.pop(plugin.__name__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue