Viewer Lock v1.8
This location is for Registered Users Only.
Perhaps you need to login or register.
14.0, 13.0, 12.0, 11.0, 10.5, 10.0 or later
Linux, Mac, Windows


What is Viewer Lock?
Don't you hate it when your viewer's not connected to the nodes you think it's connected to? Like when you're rotoing and you're trying to A/B between the plate and the comp, but the roto node's overlay has hijacked Nuke's focus and now you're looking at some random roto node?
Usually when I ask people this, they say no. But I sure do, so I made this.
Viewer Lock is a tool that allows you to lock viewer inputs to nodes, so that they're always assigned to what you think they're assigned to. I've been using this personally for several years now and thought I'd share it in case there were people out there who also have this fairly niche problem.
Usage instructions
Press Shift+V to open the Viewer Lock panel, or, if you already have one open, to bring it to focus.
The left row of checkboxes show which inputs are in use. Uncheck them to unassign the input. The right row of checkboxes show which inputs are locked. Check them to lock the input to the node it's currently assigned to, or to uncheck them to unlock. The checkboxes at the top unassign all inputs and lock/unlock all inputs, respectively.
You can also use shortcuts:
- Ctrl+Alt+(number) will lock the input to the selected node, or reassign a locked input to the selected node.
- Ctrl+Shift+(number) will unlock the input and assign it to the selected node as normal.
- Ctrl+Alt+V and Ctrl+Shift+V will lock and unlock all inputs respectively.
This has not been tested with Nuke 14 or later.
This will not work with non-commercial Nuke because of Python restrictions. :(
Installation instructions
Unzip the downloaded VL.zip fille and move the menu.py and the viewerLock folder to your .nuke folder, keeping the contents of the viewerLock folder inside that folder. If you already have a menu.py file, combine it with this one.
Pipeline considerations?
Rather than a custom node, Viewer Lock is a Python script that is called by knobChanged callbacks and simply intercepts viewer hotkeys and reassigns viewer node inputs to make sure everything stays connected to where the user wants it to be. It works (almost*) entirely independently of the Nuke script and so using it has no impact on users who don't have it installed and may need to pick up your script.
*The only changes that Viewer Lock makes to a script is adding hidden checkbox knobs to viewer nodes to keep track of lock states between Nuke sessions. Without Viewer Lock they have no function and can't interfere with a script. You won't even know they're there. :)
What's new
Thank you to Szilárd Egyed for bringing my attention to a couple of things.
- Fixed a bug where closing Nuke would sometimes open up the crash window.
- Removed a updateUI callback, it provided little benefit and came with a performance cost.
Future support
I have been promising a major overhaul for years but one has never come, due to a few fairly boring factors which are unlikely to change any time soon (not least of which is the Foundry's overly restrictive Python limitations to the NC and Indie versions of Nuke). Rather than continuing to make a liar of myself, it's best to say that is most likely going to be the last update for ViewerLock for the foreseeable future.
However, Viewer Lock is simple enough and robust enough (despite the messy code) that I imagine it will continue to work for many years and many Nuke versions to come. Also, I make no claim to the source code, and anyone is free to download, improve, and redistribute Viewer Lock as they please.
I will continue to rely on this tool at work, so if there's ever a situation where it requires an update (e.g. any major changes to the Nuke Python API) you could expect me to upload that here.
Until then, all the best!
Comments
I am having a problem with mac though. Even though I can use the GUI without issues during work time, when I quit nuke there is an issue. It doesn't tell me what is the problem, although in Terminal I get this message: Warning: Re-registering an existing pixelformat.
Disk cache /var/tmp/nuke-u 501/ViewerCache /??: 24MB (1% of 10240MB) used in 2 files.
I'm not sure that message is related though.
Any idea what may be wrong? I'm happy to help with the testing!
Cheers,
Alejandra
I'll see if I can source a Mac for the next release and get this sorted next year. Thanks for letting me know!
This one has Useful Nukepedia Tool written all over it
I have been looking for this for a very long time.
Awesome Job!!!
I want to use ViewerLock, but when I try to connect a viewer, I have this message:
'module' object has no attribute 'connect'
Is there something I have to define somewhere?
Can someone help me with that?
Thanks
Laurence
name 'addVLPanel' is not defined
It's a shame because I really liked it.
Here's the bug. If this plugin is installed (and assuming you haven't used the lock feature) then if you have different viewer inputs connected up to various nodes, then shift focus to the viewer window (eg. click in it), and toggle between your connections, then IF there is a node selected in the node graph then the first viewer channel you toggle to FLIPS to that node. It should have remained connected to whatever it was before you started toggling between viewer inputs.
Not knowing about this plugin, nor that it was installed at a studio I've been working with recently, I struggled with this bug for two months. We thought it was a bug with nuke. Finally we tracked it down to this plugin being installed and uninstalled it yesterday.
If this bug can be fixed then for sure this should be a standard tool installed everywhere!
MacOS 13.5, Nuke14, Python 3, no weirdness.
Thanks for being my MacOS tester, also glad to hear there are no issues with Python 3, still need to find the time to do some proper Nuke 13+ tests.
RSS feed for comments to this post