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

Commit

Permalink
add Houdini Deadline settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MustafaJafar committed May 16, 2024
1 parent 2d31b3b commit 0078bb4
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from openpype.lib import (
is_running_from_build,
BoolDef,
TextDef,
NumberDef
)

Expand Down Expand Up @@ -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",
Expand All @@ -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(
Expand All @@ -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,
Expand Down Expand Up @@ -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")

Expand All @@ -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")

Expand Down
19 changes: 19 additions & 0 deletions openpype/settings/defaults/project_settings/deadline.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
51 changes: 51 additions & 0 deletions server_addon/deadline/server/settings/publish_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion server_addon/deadline/server/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.8"
__version__ = "0.1.9"

0 comments on commit 0078bb4

Please sign in to comment.