diff --git a/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py b/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py index eed930e3729..df1f81d9a9d 100644 --- a/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py +++ b/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_cache_deadline.py @@ -46,10 +46,19 @@ class HoudiniCacheSubmitDeadline(abstract_submit_deadline.AbstractSubmitDeadline targets = ["local"] priority = 50 + ChunkSize = 999999 + group = None jobInfo = {} pluginInfo = {} group = None + @classmethod + def apply_settings(cls, project_settings, system_settings): + settings = project_settings["deadline"]["publish"]["HoudiniSubmitDeadline"]["HoudiniSubmitCacheDeadline"] # noqa + cls.priority = settings.get("priority", cls.priority) + cls.ChunkSize = settings.get("chunk_size", cls.ChunkSize) + cls.group = settings.get("group", cls.group) + def get_job_info(self): job_info = DeadlineJobInfo(Plugin="Houdini") @@ -89,7 +98,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.ChunkSize) 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/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 99882489574..5cb347bb979 100644 --- a/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/client/ayon_core/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -11,6 +11,7 @@ from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo from ayon_core.lib import ( BoolDef, + TextDef, NumberDef ) @@ -76,16 +77,33 @@ 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 apply_settings(cls, project_settings, system_settings): + export_settings = project_settings["deadline"]["publish"]["HoudiniSubmitDeadline"]["HoudiniSubmitExportDeadline"] # noqa + cls.export_priority = export_settings.get("priority", cls.export_priority) + cls.export_chunk_size = export_settings.get("chunk_size", cls.export_chunk_size) + cls.export_group = export_settings.get("group", cls.export_group) + + render_settings = project_settings["deadline"]["publish"]["HoudiniSubmitDeadline"]["HoudiniSubmitRenderDeadline"] # noqa + cls.priority = render_settings.get("priority", cls.priority) + cls.chunk_size = render_settings.get("chunk_size", cls.chunk_size) + cls.group = render_settings.get("group", cls.group) + @classmethod def get_attribute_defs(cls): return [ + BoolDef( + "suspend_publish", + default=False, + label="Suspend publish" + ), NumberDef( "priority", label="Priority", @@ -100,10 +118,14 @@ 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( @@ -114,11 +136,9 @@ def get_attribute_defs(cls): minimum=1, maximum=1000 ), - BoolDef( - "suspend_publish", - default=False, - label="Suspend publish" - ) + TextDef("export_group", + default=cls.export_group, + label="Export Group Name"), ] def get_job_info(self, dependency_job_ids=None): @@ -158,15 +178,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") @@ -187,15 +198,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")