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

Commit

Permalink
Merge pull request #4341 from ynput/bugfix/OP-3845_nuke-input-process…
Browse files Browse the repository at this point in the history
…-node-sourcing

Nuke Input process node sourcing improvements
  • Loading branch information
jakubjezek001 authored Jan 18, 2023
2 parents 5a48527 + 8fb7494 commit 9349a0a
Showing 1 changed file with 18 additions and 12 deletions.
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

0 comments on commit 9349a0a

Please sign in to comment.