Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(submitter): Enable capability UI for Maya Submitter #33

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/deadline/maya_submitter/maya_render_submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ def on_create_job_bundle_callback(
settings: RenderSubmitterUISettings,
queue_parameters: list[dict[str, Any]],
asset_references: AssetReferences,
host_requirements: Optional[dict[str, Any]] = None,
) -> None:
job_bundle_path = Path(job_bundle_dir)

Expand Down Expand Up @@ -576,6 +577,12 @@ def on_create_job_bundle_callback(
settings, renderers, submit_render_layers, queue_parameters
)

# If "HostRequirements" is provided, inject it into each of the "Step"
if host_requirements:
# for each step in the template, append the same host requirements.
for step in job_template["steps"]:
step["hostRequirements"] = host_requirements

with open(job_bundle_path / "template.yaml", "w", encoding="utf8") as f:
deadline_yaml_dump(job_template, f, indent=1)

Expand Down Expand Up @@ -617,6 +624,7 @@ def on_create_job_bundle_callback(
on_create_job_bundle_callback=on_create_job_bundle_callback,
parent=parent,
f=f,
show_host_requirements_tab=True,
)

submitter_dialog.show()
Expand Down