From 1d91bca162780c7bf99ee23899fe71bb37c5db3e Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Wed, 24 Feb 2021 10:44:27 +0100 Subject: [PATCH] add deadline plugins to settings --- .../plugins/publish/submit_nuke_deadline.py | 24 +- .../defaults/project_settings/deadline.json | 44 ++++ .../defaults/project_settings/harmony.json | 2 +- .../schemas/projects_schema/schema_main.json | 4 + .../projects_schema/schema_plugins.json | 54 ----- .../schema_project_deadline.json | 223 ++++++++++++++++++ .../schema_project_harmony.json | 2 +- .../schemas/schema_nuke_publish.json | 29 --- 8 files changed, 285 insertions(+), 97 deletions(-) create mode 100644 pype/settings/defaults/project_settings/deadline.json delete mode 100644 pype/settings/entities/schemas/projects_schema/schema_plugins.json create mode 100644 pype/settings/entities/schemas/projects_schema/schema_project_deadline.json diff --git a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py index b36e1fdbba..f352a9b5c0 100644 --- a/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py +++ b/pype/modules/deadline/plugins/publish/submit_nuke_deadline.py @@ -23,12 +23,12 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): optional = True # presets - deadline_priority = 50 + priority = 50 deadline_chunk_size = 1 - deadline_pool = "" - deadline_pool_secondary = "" - deadline_group = "" - deadline_department = "" + primary_pool = "" + secondary_pool = "" + group = "" + department = "" def process(self, instance): instance.data["toBeRenderedOn"] = "deadline" @@ -142,12 +142,12 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): # define chunk and priority chunk_size = instance.data.get("deadlineChunkSize") - if chunk_size == 0 and self.deadline_chunk_size: - chunk_size = self.deadline_chunk_size + if chunk_size == 0 and self.chunk_size: + chunk_size = self.chunk_size priority = instance.data.get("deadlinePriority") if not priority: - priority = self.deadline_priority + priority = self.priority payload = { "JobInfo": { @@ -165,11 +165,11 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): "Priority": priority, "ChunkSize": chunk_size, - "Department": self.deadline_department, + "Department": self.department, - "Pool": self.deadline_pool, - "SecondaryPool": self.deadline_pool_secondary, - "Group": self.deadline_group, + "Pool": self.primary_pool, + "SecondaryPool": self.secondary_pool, + "Group": self.group, "Plugin": "Nuke", "Frames": "{start}-{end}".format( diff --git a/pype/settings/defaults/project_settings/deadline.json b/pype/settings/defaults/project_settings/deadline.json new file mode 100644 index 0000000000..6844979ddb --- /dev/null +++ b/pype/settings/defaults/project_settings/deadline.json @@ -0,0 +1,44 @@ +{ + "publish": { + "MayaSubmitDeadline": { + "enabled": true, + "optional": false, + "tile_assembler_plugin": "oiio", + "use_published": true, + "asset_dependencies": true + }, + "NukeSubmitDeadline": { + "enabled": true, + "optional": false, + "use_published": true, + "priority": 50, + "Chunk Size": 10, + "primary_pool": "", + "secondary_pool": "", + "group": "", + "department": "" + }, + "HarmonySubmitDeadline": { + "enabled": true, + "optional": false, + "use_published": true, + "priority": 50, + "Chunk Size": 10000, + "primary_pool": "", + "secondary_pool": "", + "group": "", + "department": "" + }, + "AfterEffectsSubmitDeadline": { + "enabled": true, + "optional": false, + "use_published": true, + "priority": 50, + "Chunk Size": 10000, + "primary_pool": "", + "secondary_pool": "", + "group": "", + "department": "" + } + } +} \ No newline at end of file diff --git a/pype/settings/defaults/project_settings/harmony.json b/pype/settings/defaults/project_settings/harmony.json index d69b05f534..e1de4485a4 100644 --- a/pype/settings/defaults/project_settings/harmony.json +++ b/pype/settings/defaults/project_settings/harmony.json @@ -14,7 +14,7 @@ "priority": 50, "primary_pool": "", "secondary_pool": "", - "Chunk Size": 10000 + "chunk_size": 0 } } } \ No newline at end of file diff --git a/pype/settings/entities/schemas/projects_schema/schema_main.json b/pype/settings/entities/schemas/projects_schema/schema_main.json index 8ad059f1c7..31d7373873 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_main.json +++ b/pype/settings/entities/schemas/projects_schema/schema_main.json @@ -45,6 +45,10 @@ "type": "schema", "name": "schema_project_ftrack" }, + { + "type": "schema", + "name": "schema_project_deadline" + }, { "type": "schema", "name": "schema_project_maya" diff --git a/pype/settings/entities/schemas/projects_schema/schema_plugins.json b/pype/settings/entities/schemas/projects_schema/schema_plugins.json deleted file mode 100644 index a7ed64be17..0000000000 --- a/pype/settings/entities/schemas/projects_schema/schema_plugins.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "type": "dict", - "collapsible": true, - "key": "plugins", - "label": "Plugins", - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "standalonepublisher", - "label": "Standalone Publisher", - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "publish", - "label": "Publish plugins", - "is_file": true, - "children": [ - { - "type": "dict", - "collapsible": true, - "key": "ExtractThumbnailSP", - "label": "ExtractThumbnailSP", - "is_group": true, - "children": [ - { - "type": "dict", - "collapsible": false, - "key": "ffmpeg_args", - "label": "ffmpeg_args", - "children": [ - { - "type": "list", - "object_type": "text", - "key": "input", - "label": "input" - }, - { - "type": "list", - "object_type": "text", - "key": "output", - "label": "output" - } - ] - } - ] - } - ] - } - ] - } - ] -} diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_deadline.json b/pype/settings/entities/schemas/projects_schema/schema_project_deadline.json new file mode 100644 index 0000000000..ea76f4e62e --- /dev/null +++ b/pype/settings/entities/schemas/projects_schema/schema_project_deadline.json @@ -0,0 +1,223 @@ +{ + "type": "dict", + "key": "deadline", + "label": "Deadline", + "collapsible": true, + "is_file": true, + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "publish", + "label": "Publish plugins", + "is_file": true, + "children": [ + { + "type": "dict", + "collapsible": true, + "key": "MayaSubmitDeadline", + "label": "Submit maya job to deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "enum", + "key": "tile_assembler_plugin", + "label": "Tile Assembler Plugin", + "multiselection": false, + "enum_items": [ + { + "DraftTileAssembler": "Draft Tile Assembler" + }, + { + "oiio": "Open Image IO" + } + ] + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "boolean", + "key": "asset_dependencies", + "label": "Use Asset dependencies" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "NukeSubmitDeadline", + "label": "Nuke Submit to Deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "Chunk Size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "primary_pool", + "label": "Primary Pool" + }, + { + "type": "text", + "key": "secondary_pool", + "label": "Secondary Pool" + }, + { + "type": "text", + "key": "group", + "label": "Group" + }, + { + "type": "text", + "key": "department", + "label": "Department" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "HarmonySubmitDeadline", + "label": "Harmony Submit to Deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "Chunk Size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "primary_pool", + "label": "Primary Pool" + }, + { + "type": "text", + "key": "secondary_pool", + "label": "Secondary Pool" + }, + { + "type": "text", + "key": "group", + "label": "Group" + }, + { + "type": "text", + "key": "department", + "label": "Department" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "AfterEffectsSubmitDeadline", + "label": "After Effects Submit to Deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "use_published", + "label": "Use Published scene" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "Chunk Size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "primary_pool", + "label": "Primary Pool" + }, + { + "type": "text", + "key": "secondary_pool", + "label": "Secondary Pool" + }, + { + "type": "text", + "key": "group", + "label": "Group" + }, + { + "type": "text", + "key": "department", + "label": "Department" + } + ] + } + ] + } + ] +} diff --git a/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json b/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json index 583eca9692..c4cdccff42 100644 --- a/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json +++ b/pype/settings/entities/schemas/projects_schema/schema_project_harmony.json @@ -73,7 +73,7 @@ }, { "type": "number", - "key": "Chunk Size", + "key": "chunk_size", "label": "Chunk Size" } ] diff --git a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json index aa767144e5..e9b3e1c36e 100644 --- a/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json +++ b/pype/settings/entities/schemas/projects_schema/schemas/schema_nuke_publish.json @@ -107,35 +107,6 @@ } ] }, - { - "type": "dict", - "collapsible": true, - "key": "NukeSubmitDeadline", - "label": "NukeSubmitDeadline", - "is_group": true, - "children": [ - { - "type": "number", - "key": "deadline_priority", - "label": "deadline_priority" - }, - { - "type": "text", - "key": "deadline_pool", - "label": "deadline_pool" - }, - { - "type": "text", - "key": "deadline_pool_secondary", - "label": "deadline_pool_secondary" - }, - { - "type": "number", - "key": "deadline_chunk_size", - "label": "deadline_chunk_size" - } - ] - }, { "type": "schema_template", "name": "template_publish_plugin",