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

Maya: Deadline custom settings #1797

Merged
merged 5 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,22 @@ def process(self, instance):
["DEADLINE_REST_URL"]
)

self._job_info = (
context.data["project_settings"].get(
"deadline", {}).get(
"publish", {}).get(
"MayaSubmitDeadline", {}).get(
"jobInfo", {})
)

self._plugin_info = (
context.data["project_settings"].get(
"deadline", {}).get(
"publish", {}).get(
"MayaSubmitDeadline", {}).get(
"pluginInfo", {})
)

assert self._deadline_url, "Requires DEADLINE_REST_URL"

context = instance.context
Expand Down Expand Up @@ -407,7 +423,7 @@ def process(self, instance):
self.payload_skeleton["JobInfo"]["Priority"] = \
self._instance.data.get("priority", 50)

if self.group != "none":
if self.group != "none" and self.group:
self.payload_skeleton["JobInfo"]["Group"] = self.group

if self.limit_groups:
Expand Down Expand Up @@ -536,6 +552,10 @@ def process(self, instance):

self.preflight_check(instance)

# add jobInfo and pluginInfo variables from Settings
payload["JobInfo"].update(self._job_info)
payload["PluginInfo"].update(self._plugin_info)

# Prepare tiles data ------------------------------------------------
if instance.data.get("tileRendering"):
# if we have sequence of files, we need to create tile job for
Expand Down
14 changes: 10 additions & 4 deletions openpype/settings/defaults/project_settings/deadline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
"ValidateExpectedFiles": {
"enabled": true,
"active": true,
"families": ["render"],
"targets": ["deadline"],
"allow_user_override": true
"allow_user_override": true,
"families": [
"render"
],
"targets": [
"deadline"
]
},
"MayaSubmitDeadline": {
"enabled": true,
Expand All @@ -15,7 +19,9 @@
"use_published": true,
"asset_dependencies": true,
"group": "none",
"limit": []
"limit": [],
"jobInfo": {},
"pluginInfo": {}
},
"NukeSubmitDeadline": {
"enabled": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@
"key": "limit",
"label": "Limit Groups",
"object_type": "text"
},
{
"type": "raw-json",
"key": "jobInfo",
"label": "Additional JobInfo data"
},
{
"type": "raw-json",
"key": "pluginInfo",
"label": "Additional PluginInfo data"
}
]
},
Expand Down