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

Commit

Permalink
Merge pull request #1797 from pypeclub/feature/deadline_custom_settings
Browse files Browse the repository at this point in the history
Maya: Deadline custom settings
  • Loading branch information
antirotor authored Jul 12, 2021
2 parents a050f92 + 4d96cdc commit 04e045d
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
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

0 comments on commit 04e045d

Please sign in to comment.