LayerShuffler v1.3
This location is for Registered Users Only.
Perhaps you need to login or register.
11.0, 10.5, 10.0, 9.0, 8.0, 7.0, 6.0 or later
Linux, Mac, Windows
IMPORTANT NOTE (IF YOU HAVE DOWNLOADED PRE-v1.2):
Please revisit the Installation Guide, specifically for the menu.py setup step. I have changed the commands text and the name of the LayerShuffler file itself. This will ensure that for future versions you will only have to replace the LayerShuffler Python file itself!
Changelog for the current version can be found at the bottom of the page.
Layer Shuffler
Layer Shuffler provides the utility to review a list of identified layers in the node stream of the currently targeted node and extract each layer into Shuffle nodes. Beyond that, in the case of dealing with rendered files, it allows the separation of your Main Passes and AOV passes through two different list selections, as well as custom naming of both. It also allows you to rebuild the main passes of your render, should you desire to do so. However, this feature is currently limited to Arnold and VRay only. More rebuild options will be added in the future. A custom order for arranging the layers after the Shuffle can also be specified by the user. Nodes can be stored in a list to be added during the Shuffle process, the only restriction there being that the node has to be able to receive inputs and create outputs. A selection of an arbitrary amounts of nodes in the Node Graph can be stored as Node Tree Presets which will allow you to later respawn the same set of nodes with their knobs' settings, relative locations to each other and their connections.
This tool acts as a Nuke panel and can therefore be floated, docked to other areas, multiple instances can be spawned, etc. The UI will also locally save the options that you have last set for some elements in a Preferences file.
INSTALLATION GUIDE:
In the contents folder you'll find a 'layerShuffler' folder - copy that to your '.nuke' directory.
In your 'init.py' file in '.nuke', add the following code:
nuke.pluginAddPath('./layerShuffler')
In 'menu.py', add the following code, but make sure the '# IMPORTS' section is in the beginning of your 'menu.py' file:
# IMPORTS - these go in the beginning of your menu.py
from nukescripts import panels
import LayerShuffler
The '# REGISTRATION' section can be placed at any point after that:
# REGISTRATION - this goes at any point after the Imports
panels.registerWidgetAsPanel('LayerShuffler.LayerShuffler', 'Layer Shuffler', 'LayerShufflerPanelId')
If Nuke is opened, restart for changes to take effect. You will then find the Layer Shuffler as a Nuke panel type under the 'Custom' menu.
FUTURE IMPLEMENTATIONS:
More rebuilds - Scanline, Renderman.
Future versions of the tool will attempt to improve the algorithms for Rebuilds for certain cases where the user might only want to rebuild a few of the required passes for the rebuild. Currently, the algorithms are flawed and unpredictable in that regard.
VERSION CHANGELOG (v1.3):
-
Functionality changes:
-
Added a “Saved Node Trees” tab
-
This feature allows you to save a selection of nodes in the node graph and store them to a file which can then be called upon later, to rebuild them in the Node Graph again (with their values, relative positions and connections)
-
-
-
UI changes:
-
Node Distance Slider received some improvements in usability - it will not longer snap between values when you drag the dot.
-
The UI will now save the values you input for some widgets to a “preferences” file in the directory of the LayerShuffler Python file. Those widgets include:
-
Both backdrop naming fields
-
The two lists with your layers in the Shuffler tab
-
The following checkboxes:
-
“Skip EXR Check”
-
“Shuffle selected layers only”
-
“Unlock Shuffle Ordering”
-
-
“Select color” button’s color value
-
The following dropdown boxes:
-
Rebuild direction
-
Renderer selection
-
-
Node distance slider (both the number field and slider value itself)
-
-
-
Fixes:
-
Added support for storing Group nodes in the tool. Before, it would store the node itself and its knobs, but nothing inside the Group and would therefore be respawned empty.
-
Full changelog can be found in the downloaded ZIP file.
Contact details:
If you have questions, feel free to contact me on [email protected]. I intend to maintain and improve the tool over time so bug reports and feature suggestions are welcome, all I ask is that you give the subject line of your email a meaningful text!
Comments
Select all, clear selection, select remaining.. etc, not working either.
I couldn't find any issues with the Rebuild, though. If anyone else is experiencing this, please give me as much detail as you can.
Sorry, my bad, the video didn't show that you have to hit (Use renderer-specii fic rebuild), figured out that you should, works like a charm!
*Just a suggestion for a future update. Add unpremult option to each pass and premult at the end, with a copy of alpha channel.
Not sure whats going on. any help?
nuke.pluginAddPath('./layerShuffler')
This is what tells Nuke where to find the code.
Also, please make sure that the LayerShuffler.p y file is specifically under [...]/.nuke/lay erShuffler (wherever your .nuke folder may be).
If these steps do not help, it might not be an issue with the general setup but perhaps with how you're running Nuke.
It would be great to have the rebuild function also for Redshift and Mantra too..and maybe the whole stuff as a node instead of a pannel
bytheway grat work!!
I've wanted to come back to this tool for a while as I have a few improvement ideas sitting in the backlog. For example, I want to find a way to make these presets more user-customizab le to account for future compatibility, personal flavoring, even making your own presets for renderers I couldn't account for.
Alas, I wrote this while I was still in university, so I had access to a Nuke license and since I've graduated I don't have that access. And Nuke is kinda expensive for a starting professional, as it turns out! In the non-commercial version, this tool is kind of unusable due to the 10 node scripting limit.
As for putting it in a node, I didn't find a way to dock my PySide UI inside a custom node type of my own so I had to go with a UI panel.
Definitely am planning on circling back to this when I can later on, so I guess watch this space in the future, haha!
Is there a way to open it on a floating panel through python, rather than having to go through pane options window -> custom -> Layer Shuffler?
" .nuke/menu.py", line 10, in
import LayerShuffler
ModuleNotFoundError: No module named 'LayerShuffler')"
please update this for latest release.
File "C:/Program Files/Nuke13.2v 1/plugins\nukes cripts\panels.p y", line 153, in makeUI
self.widget = self.widgetClas s()
File "C:/Users/J/.nu ke/layerShuffle r\LayerShuffler .py", line 49, in __init__
self.updateInfo rmation(onCreat ion = True)
File "C:/Users/J/.nu ke/layerShuffle r\LayerShuffler .py", line 593, in updateInformati on
layerNames = self.gatherLaye rs(n)
File "C:/Users/J/.nu ke/layerShuffle r\LayerShuffler .py", line 294, in gatherLayers
nukeLayers.remove("rgb")
ValueError: list.remove(x): x not in list
In Nuke13.2 the above error is displayed
Please update to this latest version.
Thank you to everyone who has sent me nice comments about this tool. I am glad to hear that people are finding it useful!
And also thank you for the continued interest and requests!
I am here to let everyone know that the creation of this tool was a small passion project of mine during my time at University, where I had access to a full Nuke license, so I was able to develop the tool at the time.
Since I left University, I have not had the chance to obtain a commercial license for Nuke, which means that the 10 node Python limit prevents me from doing further development. The new Indie license also has that limitation, so unfortunately that does not help out either!
So I'm sad to let everyone know that, for the time being, I will not be able to provide any updates to this tool until I can get my hands on a full license.
I am definitely interested to take the tool further, modernize it for Nuke 13+, implement some of the great suggestions people have sent my way over time, etc. but I will not be able to for now.
So do feel free to check back in over time in case I am able to make any changes at some point! Or follow the Nukepedia page on Facebook which I believe will automatically send updates for any new versions I upload.
Thanks again for everyone's interest, it has been great to see how far and wide this tool has been of use!
In the mean time here is a fix for 13+
Change line 1714 from
backd.setXYpos(xpos, ypos)
to
backd.setXYpos(int(xpos), int(ypos))
This still uses the old version of the shuffle node, but at least it works. I may try to update the shuffle node call at some point, but since it's working and I have work to do maybe I'll leave that for someone else to update.
You can find a working version here: https://github.com/itaki/nuke/blob/master/LayerShuffler/LayerShuffler.py
I'm not sure if all the rebuild options and everything work, but the shuffler itself seems to work. Let me know if you find any bugs and I'll try to fix them.
Thanks again Kaloyan for this great script. Just digging through it was pretty amazing how you made this all work.
Thank You
RSS feed for comments to this post