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

Nuke Input process node sourcing improvements #4341

Merged
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
30 changes: 18 additions & 12 deletions openpype/hosts/nuke/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,18 +897,24 @@ def get_view_process_node():
for v_ in nuke.allNodes(filter="Viewer"):
ipn = v_['input_process_node'].getValue()
ipn_node = nuke.toNode(ipn)
if ipn_node:
if ipn == "VIEWER_INPUT":
# since it is set by default we can ignore it
# nobody usually use this
continue
else:
# in case a Viewer node is transfered from
# different workfile with old values
raise NameError((
"Input process node name '{}' set in "
"Viewer '{}' is does't exists in nodes"
).format(ipn, v_.name()))

# skip if no input node is set
if not ipn:
continue

if ipn == "VIEWER_INPUT" and not ipn_node:
# since it is set by default we can ignore it
# nobody usually use this but use it if
# it exists in nodes
continue

if not ipn_node:
# in case a Viewer node is transfered from
# different workfile with old values
raise NameError((
"Input process node name '{}' set in "
"Viewer '{}' is does't exists in nodes"
).format(ipn, v_.name()))

ipn_node.setSelected(True)

Expand Down