Saturday, May 4, 2019

Nuke - Lock Viewer Input

You might find confusing in nuke to switch between viewer inputs. Here is a short script which can lock the specified input of the viewer.

 def lockThisVersion():  
   nuke.activeViewer().node().setInput(9, nuke.toNode("Read1"))  
 def callbackLockThisVersion():  
   nuke.addKnobChanged(lockThisVersion, nodeClass='Viewer')  
 if __name__ == '__main__':  

So as we can see in the sample code, the 9 input is locked to the node called Read1. We can replace this name in the code with the exact node name what we want to lock.

No comments:

Post a Comment