From 1968dc465edcf26dc53f8d749d94d51e79b21fc0 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 12 Aug 2019 12:31:21 +0200 Subject: [PATCH] presets are loaded only once instead of loading for each plugin --- pype/lib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pype/lib.py b/pype/lib.py index 7009743c97..3b8b0fee21 100644 --- a/pype/lib.py +++ b/pype/lib.py @@ -467,10 +467,14 @@ 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[:]: try: - config_data = config.get_presets()['plugins'][host]["publish"][plugin.__name__] # noqa: E501 + config_data = presets[plugin.__name__] # noqa: E501 except KeyError: continue