From 0078bb45fb5c4966937300447651fc7e42ee1b53 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 16 May 2024 14:06:05 +0300 Subject: [PATCH 1/3] add Houdini Deadline settings --- .../publish/submit_houdini_cache_deadline.py | 5 +- .../publish/submit_houdini_render_deadline.py | 43 ++++++--- .../defaults/project_settings/deadline.json | 19 ++++ .../schema_project_deadline.json | 93 +++++++++++++++++++ .../server/settings/publish_plugins.py | 51 ++++++++++ server_addon/deadline/server/version.py | 2 +- 6 files changed, 196 insertions(+), 17 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py index bef93b3947c..2f94110736b 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py @@ -51,9 +51,10 @@ class HoudiniCacheSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline targets = ["local"] priority = 50 + chunk_size = 999999 + group = None jobInfo = {} pluginInfo = {} - group = None def get_job_info(self): job_info = DeadlineJobInfo(Plugin="Houdini") @@ -100,7 +101,7 @@ def get_job_info(self): attr_values = self.get_attr_values_from_data(instance.data) - job_info.ChunkSize = instance.data["chunkSize"] + job_info.ChunkSize = instance.data.get("chunkSize", self.chunk_size) job_info.Comment = context.data.get("comment") job_info.Priority = attr_values.get("priority", self.priority) job_info.Group = attr_values.get("group", self.group) diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 6ed9e66ce08..ab872b3baa9 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -12,6 +12,7 @@ from openpype.lib import ( is_running_from_build, BoolDef, + TextDef, NumberDef ) @@ -77,16 +78,21 @@ class HoudiniSubmitDeadline( use_published = True # presets - priority = 50 - chunk_size = 1 export_priority = 50 export_chunk_size = 10 - group = "" export_group = "" + priority = 50 + chunk_size = 1 + group = "" @classmethod def get_attribute_defs(cls): return [ + BoolDef( + "suspend_publish", + default=False, + label="Suspend publish" + ), NumberDef( "priority", label="Priority", @@ -101,10 +107,15 @@ def get_attribute_defs(cls): minimum=1, maximum=1000 ), + TextDef( + "group", + default=cls.group, + label="Group Name" + ), NumberDef( "export_priority", label="Export Priority", - default=cls.priority, + default=cls.export_priority, decimals=0 ), NumberDef( @@ -115,6 +126,11 @@ def get_attribute_defs(cls): minimum=1, maximum=1000 ), + TextDef( + "export_group", + default=cls.export_group, + label="Export Group Name" + ), BoolDef( "suspend_publish", default=False, @@ -159,15 +175,6 @@ def get_job_info(self, dependency_job_ids=None): job_info.UserName = context.data.get( "deadlineUser", getpass.getuser()) - if split_render_job and is_export_job: - job_info.Priority = attribute_values.get( - "export_priority", self.export_priority - ) - else: - job_info.Priority = attribute_values.get( - "priority", self.priority - ) - if is_in_tests(): job_info.BatchName += datetime.now().strftime("%d%m%Y%H%M%S") @@ -188,15 +195,23 @@ def get_job_info(self, dependency_job_ids=None): job_info.Pool = instance.data.get("primaryPool") job_info.SecondaryPool = instance.data.get("secondaryPool") - job_info.Group = self.group + if split_render_job and is_export_job: + job_info.Priority = attribute_values.get( + "export_priority", self.export_priority + ) job_info.ChunkSize = attribute_values.get( "export_chunk", self.export_chunk_size ) + job_info.Group = self.export_group else: + job_info.Priority = attribute_values.get( + "priority", self.priority + ) job_info.ChunkSize = attribute_values.get( "chunk", self.chunk_size ) + job_info.Group = self.group job_info.Comment = context.data.get("comment") diff --git a/openpype/settings/defaults/project_settings/deadline.json b/openpype/settings/defaults/project_settings/deadline.json index 0c4b282d102..eb7cb673cf5 100644 --- a/openpype/settings/defaults/project_settings/deadline.json +++ b/openpype/settings/defaults/project_settings/deadline.json @@ -36,6 +36,25 @@ "scene_patches": [], "strict_error_checking": true }, + "HoudiniCacheSubmitDeadline": { + "enabled": true, + "optional": false, + "active": true, + "priority": 50, + "chunk_size": 999999, + "group": "" + }, + "HoudiniSubmitDeadline": { + "enabled": true, + "optional": false, + "active": true, + "priority": 50, + "chunk_size": 1, + "group": "", + "export_priority": 50, + "export_chunk_size": 10, + "export_group": "" + }, "MaxSubmitDeadline": { "enabled": true, "optional": false, diff --git a/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json b/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json index bb8e0b5cd48..f0358c97182 100644 --- a/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json +++ b/openpype/settings/entities/schemas/projects_schema/schema_project_deadline.json @@ -204,6 +204,99 @@ } ] }, + { + "type": "dict", + "collapsible": true, + "key": "HoudiniCacheSubmitDeadline", + "label": "Houdini Submit cache to deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "active", + "label": "Active" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "chunk_size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "group", + "label": "Group Name" + } + ] + }, + { + "type": "dict", + "collapsible": true, + "key": "HoudiniSubmitDeadline", + "label": "Houdini Submit render to deadline", + "checkbox_key": "enabled", + "children": [ + { + "type": "boolean", + "key": "enabled", + "label": "Enabled" + }, + { + "type": "boolean", + "key": "optional", + "label": "Optional" + }, + { + "type": "boolean", + "key": "active", + "label": "Active" + }, + { + "type": "number", + "key": "priority", + "label": "Priority" + }, + { + "type": "number", + "key": "chunk_size", + "label": "Chunk Size" + }, + { + "type": "text", + "key": "group", + "label": "Group Name" + }, + { + "type": "number", + "key": "export_priority", + "label": "Export Priority" + }, + { + "type": "number", + "key": "export_chunk_size", + "label": "Export Chunk Size" + }, + { + "type": "text", + "key": "export_group", + "label": "Export Group" + } + ] + }, { "type": "dict", "collapsible": true, diff --git a/server_addon/deadline/server/settings/publish_plugins.py b/server_addon/deadline/server/settings/publish_plugins.py index 8abe59674bf..dc7a34a89e2 100644 --- a/server_addon/deadline/server/settings/publish_plugins.py +++ b/server_addon/deadline/server/settings/publish_plugins.py @@ -211,6 +211,32 @@ class HarmonySubmitDeadlineModel(BaseSettingsModel): department: str = SettingsField(title="Department") +class HoudiniSubmitDeadlineModel(BaseSettingsModel): + """Houdini deadline render submitter settings.""" + enabled: bool = SettingsField(title="Enabled") + optional: bool = SettingsField(title="Optional") + active: bool = SettingsField(title="Active") + + priority: int = SettingsField(title="Priority") + chunk_size: int = SettingsField(title="Chunk Size") + group: str = SettingsField(title="Group") + + export_priority: int = SettingsField(title="Export Priority") + export_chunk_size: int = SettingsField(title="Export Chunk Size") + export_group: str = SettingsField(title="Export Group") + + +class HoudiniCacheSubmitDeadlineModel(BaseSettingsModel): + """Houdini deadline cache submitter settings.""" + enabled: bool = SettingsField(title="Enabled") + optional: bool = SettingsField(title="Optional") + active: bool = SettingsField(title="Active") + + priority: int = SettingsField(title="Priority") + chunk_size: int = SettingsField(title="Chunk Size") + group: str = SettingsField(title="Group") + + class AfterEffectsSubmitDeadlineModel(BaseSettingsModel): """After Effects deadline submitter settings.""" @@ -309,6 +335,12 @@ class PublishPluginsModel(BaseSettingsModel): MayaSubmitDeadline: MayaSubmitDeadlineModel = SettingsField( default_factory=MayaSubmitDeadlineModel, title="Maya Submit to deadline") + HoudiniCacheSubmitDeadline: HoudiniCacheSubmitDeadlineModel = SettingsField( + default_factory=HoudiniCacheSubmitDeadlineModel, + title="Houdini Submit cache to deadline") + HoudiniSubmitDeadline: HoudiniSubmitDeadlineModel = SettingsField( + default_factory=HoudiniSubmitDeadlineModel, + title="Houdini Submit render to deadline") MaxSubmitDeadline: MaxSubmitDeadlineModel = SettingsField( default_factory=MaxSubmitDeadlineModel, title="Max Submit to deadline") @@ -376,6 +408,25 @@ class PublishPluginsModel(BaseSettingsModel): "pluginInfo": "", "scene_patches": [] }, + "HoudiniCacheSubmitDeadline": { + "enabled": True, + "optional": False, + "active": True, + "priority": 50, + "chunk_size": 999999, + "group": "" + }, + "HoudiniSubmitDeadline": { + "enabled": True, + "optional": False, + "active": True, + "priority": 50, + "chunk_size": 1, + "group": "", + "export_priority": 50, + "export_chunk_size": 10, + "export_group": "" + }, "MaxSubmitDeadline": { "enabled": True, "optional": False, diff --git a/server_addon/deadline/server/version.py b/server_addon/deadline/server/version.py index 9cb17e79762..c11f861afbe 100644 --- a/server_addon/deadline/server/version.py +++ b/server_addon/deadline/server/version.py @@ -1 +1 @@ -__version__ = "0.1.8" +__version__ = "0.1.9" From 5166f8030b21adf5c0a8cb345075e282ab2152e5 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 16 May 2024 14:06:44 +0300 Subject: [PATCH 2/3] add Houdini product families --- .../deadline/plugins/publish/collect_pools.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index 9ee079b892e..e3fc0b35edb 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -31,14 +31,22 @@ class CollectDeadlinePools(pyblish.api.InstancePlugin, "harmony" "nuke", "maya", - "max"] + "max", + "houdini"] families = ["render", "rendering", "render.farm", "renderFarm", "renderlayer", - "maxrender"] + "maxrender", + "usdrender", + "redshift_rop", + "arnold_rop", + "mantra_rop", + "karma_rop", + "vray_rop", + "publish.hou"] primary_pool = None secondary_pool = None From 6d04ebc594d4a793c72ca6bf47dcd6d7d886cb02 Mon Sep 17 00:00:00 2001 From: MustafaJafar Date: Thu, 16 May 2024 14:14:43 +0300 Subject: [PATCH 3/3] shushing hound --- server_addon/deadline/server/settings/publish_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server_addon/deadline/server/settings/publish_plugins.py b/server_addon/deadline/server/settings/publish_plugins.py index dc7a34a89e2..6f5e8c00305 100644 --- a/server_addon/deadline/server/settings/publish_plugins.py +++ b/server_addon/deadline/server/settings/publish_plugins.py @@ -335,7 +335,7 @@ class PublishPluginsModel(BaseSettingsModel): MayaSubmitDeadline: MayaSubmitDeadlineModel = SettingsField( default_factory=MayaSubmitDeadlineModel, title="Maya Submit to deadline") - HoudiniCacheSubmitDeadline: HoudiniCacheSubmitDeadlineModel = SettingsField( + HoudiniCacheSubmitDeadline: HoudiniCacheSubmitDeadlineModel = SettingsField( # noqa default_factory=HoudiniCacheSubmitDeadlineModel, title="Houdini Submit cache to deadline") HoudiniSubmitDeadline: HoudiniSubmitDeadlineModel = SettingsField(