Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

AfterEffects: exposing Deadline pools fields in Publisher UI #6079

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions openpype/modules/deadline/plugins/publish/collect_pools.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
# -*- coding: utf-8 -*-
"""Collect Deadline pools. Choose default one from Settings

"""
import pyblish.api
from openpype.lib import TextDef
from openpype.pipeline.publish import OpenPypePyblishPluginMixin


class CollectDeadlinePools(pyblish.api.InstancePlugin,
OpenPypePyblishPluginMixin):
"""Collect pools from instance if present, 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"
families = ["rendering",
hosts = ["aftereffects",
"fusion",
"harmony"
"nuke",
"maya",
"max"]

families = ["render",
kalisp marked this conversation as resolved.
Show resolved Hide resolved
"rendering",
"render.farm",
"renderFarm",
"renderlayer",
Expand All @@ -30,7 +51,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"] = (
Expand Down Expand Up @@ -60,8 +80,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")
]
Loading