shuffleFromViewer v1.1
This location is for Registered Users Only.
Perhaps you need to login or register.
12.2, 12.1, 12.0, 11.3, 11.2, 11.1, 11.0, 10.5, 10 or later
Linux, Mac, Windows


You can watch a video demo of this tool here: https://www.youtube.com/watch?v=AiVtWjrtDlk
When I'm working with CG renders that include excesive numbers of AOVs I find it a real pain to look through and find the ones I need to work with. I found the easiest way to go through them was the view the render and then use the Page Up/Page Down keys to change the layer that the viewer is showing. But once I found a layer I wanted I would have to go back to the node graph, create a shuffle node and then find the layer again.
I created this python script to speed up the process. Now, once I find a layer I want I can press CTRL+ALT+SHIFT+S (couldn't think of a better keybaord shortcut) and the script will automatically create a new shuffle node with the first in set to whatever layer I was viewing. If one or more shuffle nodes were already selected in the Node Graph then the script will change the first in of these nodes, rather than creating new nodes.
I thought I may as well also create the reverse script, so if you have a shuffle node selected it you can set the viewer to view the matching layer with CTRL+ALT+SHIFT+V.
I've tried to write it so that it will create the new Shuffle 2 node if you are using Nuke 12, but if that fails it will create an old Shuffle node if you are using an older version of Nuke, but I haven't had access to Nuke 11 to test it. Please let me know if it doesn't work.
To install it, download this file and move it to wherever you keep your python scripts and just add import shuffleFromViewer to your menu.py
Comments
first i did not even know about the page up / down ! thanks for that.
i have not use your code yet but i would think that after the shuffle is created, it would be usefull to set the viewer back to rgba, to go on and use the pass you just shuffle in the main comp.
also for the label, i guess you could add it to an existing shuffle if you test first if it's empty, but i'm used to having a label like this as a knobDefault anyway!
It is quite a simple fix though. If you look at the top of the script there is a function called createShuffleNo de(). Inside there there is a try and except statement. The try statement is attempts to create a new shuffle node, from Nuke 12, and if that doesn't work the except statement creates an old shuffle node.
You just need to add this line after the except statement but making sure the indentation of the line lines up with the word except, so that it isn't part of the except statement and will run after either the try or the excpet:
nuke.activeViewer().node()['channels'].setValue('rgba')
This will set the viewer back to rgba after either of the shuffle nodes have been created.
RSS feed for comments to this post