From 8208bef6f31933a1b0aef5151dc2b957e712fe03 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 25 Oct 2024 23:06:12 +0200 Subject: [PATCH 1/2] Allow to target not only `productType` by default with attributes, but also by `families` data on created instance --- client/ayon_core/pipeline/publish/publish_plugins.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/ayon_core/pipeline/publish/publish_plugins.py b/client/ayon_core/pipeline/publish/publish_plugins.py index d2c70894cc..6a2f4c0279 100644 --- a/client/ayon_core/pipeline/publish/publish_plugins.py +++ b/client/ayon_core/pipeline/publish/publish_plugins.py @@ -205,9 +205,9 @@ def instance_matches_plugin_families( if not cls.__instanceEnabled__: return False - for _ in pyblish.logic.plugins_by_families( - [cls], [instance.product_type] - ): + families = [instance.product_type] + families.extend(instance.data.get("families", [])) + for _ in pyblish.logic.plugins_by_families([cls], families): return True return False From 3da898b3440b5fd9ba75887205e033cc834685a2 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 11 Nov 2024 15:37:59 +0100 Subject: [PATCH 2/2] Update client/ayon_core/pipeline/publish/publish_plugins.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> --- client/ayon_core/pipeline/publish/publish_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/ayon_core/pipeline/publish/publish_plugins.py b/client/ayon_core/pipeline/publish/publish_plugins.py index 6a2f4c0279..57215eff68 100644 --- a/client/ayon_core/pipeline/publish/publish_plugins.py +++ b/client/ayon_core/pipeline/publish/publish_plugins.py @@ -206,7 +206,7 @@ def instance_matches_plugin_families( return False families = [instance.product_type] - families.extend(instance.data.get("families", [])) + families.extend(instance.get("families", [])) for _ in pyblish.logic.plugins_by_families([cls], families): return True return False