Skip to content

Commit

Permalink
fix: Handle case when the Deadline Cloud Submitter is opened from an …
Browse files Browse the repository at this point in the history
…unsaved scene

Signed-off-by: Julie Langmann <69699954+jlangmann-aws@users.noreply.github.com>
  • Loading branch information
jlangmann-aws committed Sep 20, 2023
1 parent df01abc commit 452bcac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/deadline/nuke_submitter/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@

def get_nuke_script_file() -> str:
"""Gets the nuke script file (.nk)"""
return normpath(nuke.root().knob("name").value())
script_path = nuke.root().knob("name").value()
if script_path:
return normpath(script_path)
return ""


def get_project_path() -> str:
Expand Down
8 changes: 7 additions & 1 deletion src/deadline/nuke_submitter/deadline_submitter_for_nuke.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,14 @@ def show_nuke_render_submitter(parent, f=Qt.WindowFlags()) -> "SubmitJobToDeadli
render_settings.frame_list = str(nuke.root().frameRange())
render_settings.is_proxy_mode = nuke.root().proxy()

script_path = get_nuke_script_file()
if not script_path:
raise DeadlineOperationError(
"The Nuke Script is not saved to disk. Please save it before opening the submitter dialog."
)

# Load the sticky settings
render_settings.load_sticky_settings(get_nuke_script_file())
render_settings.load_sticky_settings(script_path)

def on_create_job_bundle_callback(
widget: SubmitJobToDeadlineDialog,
Expand Down

0 comments on commit 452bcac

Please sign in to comment.