From 6afd0b8f643ca5203a82eeda06cc410a46f5da80 Mon Sep 17 00:00:00 2001 From: kalisp Date: Wed, 20 Dec 2023 16:25:11 +0100 Subject: [PATCH 1/3] OP-6421 - added render family to families filter As published instances follow product type `render` now, fields wouldn't be shown for them. --- .../deadline/plugins/publish/collect_pools.py | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index a25b149f116..ce17fbde738 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -1,5 +1,15 @@ # -*- coding: utf-8 -*- -"""Collect Deadline pools. Choose default one from Settings +"""Collect pools from instance or attributes, from Setting otherwise. + +Pools are used to control which DL workers could render the job. + +Pools might be set directly on the instance (set directly in DCC eg. Maya) +or from Publisher attributes or from defaults from Settings. + +Publisher attributes could be shown even for local instances as visibility +is driven by product type of the instance (which will be `render` most +likely). (Might be resolved in the future and class attribute 'families' should +be cleaned up.) """ import pyblish.api @@ -9,11 +19,12 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, OpenPypePyblishPluginMixin): - """Collect pools from instance if present, from Setting otherwise.""" + """Collect pools from instance or attributes, from Setting otherwise.""" order = pyblish.api.CollectorOrder + 0.420 label = "Collect Deadline Pools" - families = ["rendering", + families = ["render", + "rendering", "render.farm", "renderFarm", "renderlayer", @@ -30,7 +41,6 @@ def apply_settings(cls, project_settings, system_settings): cls.secondary_pool = settings.get("secondary_pool", None) def process(self, instance): - attr_values = self.get_attr_values_from_data(instance.data) if not instance.data.get("primaryPool"): instance.data["primaryPool"] = ( @@ -60,8 +70,12 @@ def get_attribute_defs(cls): return [ TextDef("primaryPool", label="Primary Pool", - default=cls.primary_pool), + default=cls.primary_pool, + tooltip="Deadline primary pool, " + "applicable for farm rendering"), TextDef("secondaryPool", label="Secondary Pool", - default=cls.secondary_pool) + default=cls.secondary_pool, + tooltip="Deadline secondary pool, " + "applicable for farm rendering") ] From 8500790a92e6f7177244bd03e10da8ad472913ee Mon Sep 17 00:00:00 2001 From: kalisp Date: Wed, 20 Dec 2023 17:16:36 +0100 Subject: [PATCH 2/3] OP-6421 - updated documentation --- .../deadline/plugins/publish/collect_pools.py | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index ce17fbde738..8290c28866b 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -1,17 +1,4 @@ # -*- coding: utf-8 -*- -"""Collect pools from instance or attributes, from Setting otherwise. - -Pools are used to control which DL workers could render the job. - -Pools might be set directly on the instance (set directly in DCC eg. Maya) -or from Publisher attributes or from defaults from Settings. - -Publisher attributes could be shown even for local instances as visibility -is driven by product type of the instance (which will be `render` most -likely). (Might be resolved in the future and class attribute 'families' should -be cleaned up.) - -""" import pyblish.api from openpype.lib import TextDef from openpype.pipeline.publish import OpenPypePyblishPluginMixin @@ -19,7 +6,23 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, OpenPypePyblishPluginMixin): - """Collect pools from instance or attributes, from Setting otherwise.""" + """Collect pools from instance or Publisher attributes, from Setting + otherwise. + + Pools are used to control which DL workers could render the job. + + Pools might be set: + - directly on the instance (set directly in DCC) + - from Publisher attributes + - from defaults from Settings. + + Publisher attributes could be shown even for instances that should be + rendered locally as visibility is driven by product type of the instance + (which will be `render` most likely). + (Might be resolved in the future and class attribute 'families' should + be cleaned up.) + + """ order = pyblish.api.CollectorOrder + 0.420 label = "Collect Deadline Pools" From f0329d5dcd682df4dab5cdce014a6ed8dcc6e742 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 8 Jan 2024 11:46:59 +0100 Subject: [PATCH 3/3] OP-6421 - added hosts filter Limits this with higher precision. --- openpype/modules/deadline/plugins/publish/collect_pools.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index 8290c28866b..9ee079b892e 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -26,6 +26,13 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, order = pyblish.api.CollectorOrder + 0.420 label = "Collect Deadline Pools" + hosts = ["aftereffects", + "fusion", + "harmony" + "nuke", + "maya", + "max"] + families = ["render", "rendering", "render.farm",