From 5c53d201244b1bf5d5914a23c936472b594fb6d9 Mon Sep 17 00:00:00 2001 From: "robin@ynput.io" Date: Mon, 3 Feb 2025 10:51:59 +0100 Subject: [PATCH] Address feedback from PR. --- client/ayon_core/pipeline/create/creator_plugins.py | 5 +++-- client/ayon_core/pipeline/publish/lib.py | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client/ayon_core/pipeline/create/creator_plugins.py b/client/ayon_core/pipeline/create/creator_plugins.py index a7f191bc44..69cd3894af 100644 --- a/client/ayon_core/pipeline/create/creator_plugins.py +++ b/client/ayon_core/pipeline/create/creator_plugins.py @@ -877,10 +877,11 @@ class Creator(BaseCreator): # If follow workfile, gather version from workfile path. if version is None and follow_workfile_version and current_workfile: workfile_version = get_version_from_path(current_workfile) - version = int(workfile_version) + if workfile_version is not None: + version = int(workfile_version) # Fill-up version with next version available. - elif version is None: + if version is None: versions = self.get_next_versions_for_instances( [instance] ) diff --git a/client/ayon_core/pipeline/publish/lib.py b/client/ayon_core/pipeline/publish/lib.py index 9adfc5e9e2..cc5f67c74b 100644 --- a/client/ayon_core/pipeline/publish/lib.py +++ b/client/ayon_core/pipeline/publish/lib.py @@ -460,14 +460,14 @@ def filter_pyblish_plugins(plugins): ) apply_plugin_settings_automatically(plugin, plugin_settins, log) + # Remove disabled plugins + if getattr(plugin, "enabled", True) is False: + plugins.remove(plugin) + # Pyblish already operated a filter based on host. # But applying settings might have changed "hosts" # value in plugin so re-filter. - if not pyblish.plugin.host_is_compatible(plugin): - plugins.remove(plugin) - - # Remove disabled plugins - elif getattr(plugin, "enabled", True) is False: + elif not pyblish.plugin.host_is_compatible(plugin): plugins.remove(plugin)