Merge pull request #1797 from pypeclub/feature/deadline_custom_settings

Maya: Deadline custom settings
This commit is contained in:
Ondřej Samohel 2021-07-12 14:14:38 +02:00 committed by GitHub
commit 04e045ddbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 5 deletions

View file

@ -271,6 +271,22 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
["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
@ -407,7 +423,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
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:
@ -536,6 +552,10 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
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

View file

@ -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,
@ -15,7 +19,9 @@
"use_published": true,
"asset_dependencies": true,
"group": "none",
"limit": []
"limit": [],
"jobInfo": {},
"pluginInfo": {}
},
"NukeSubmitDeadline": {
"enabled": true,

View file

@ -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"
}
]
},