LayerShuffler v1.3


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Kaloyan Ganev
A handy UI tool that allows user freedom when dealing with multi-layer files (or node streams). The tool has options for custom layer extractions into Shuffle nodes, custom order of extraction, adding nodes after the extraction and more!
Requirements:
11.0, 10.5, 10.0, 9.0, 8.0, 7.0, 6.0 or later
Linux, Mac, Windows
26 Jun 2018
1128

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 Demo Video

vimeo screenshot


 

Layer Shuffler

main page2

 


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.

startup


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!

Please login in order to download these files.

Comments   

 
0 # zxcvzxcv zxcvzxcv 2018-05-18 14:48
.
 
 
0 # zxcvzxcv zxcvzxcv 2018-05-18 14:52
.
 
 
0 # Yan Ligoth 2018-05-21 11:00
Rebuild seems not to work on 11.1 version.
Select all, clear selection, select remaining.. etc, not working either.
 
 
0 # Yan Ligoth 2018-05-21 11:08
global name 'PySide' is not defined
 
 
0 # Kaloyan Ganev 2018-05-21 12:01
Thanks for letting me know. I may have an idea why the buttons might not be working but no idea about the rebuild. Could you send me a screenshot of the options you've selected in the UI and also of the error message you get? Especially if there's a line number there, that'd be really helpful!
 
 
0 # Kaloyan Ganev 2018-05-22 22:53
The issue with the buttons has now been fixed. Download the file again and just replace your .py file in the layerShuffler folder and that should do it.

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.
 
 
0 # Yan Ligoth 2018-05-23 18:00
Awesome! It does work now.
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.
 
 
0 # Aleh Maksimovich 2018-07-10 08:25
add "RedShift render" to preset!!!!!!!!! !!!!!
 
 
0 # Spencer Fitch 2018-11-20 16:48
I put the proper code into the proper spots but I keep receiving this error in the log - ImportError: No module named LayerShuffler

Not sure whats going on. any help?
 
 
0 # Kaloyan Ganev 2018-11-20 23:00
Could you please make sure your init.py file contains the necessary line:

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.
 
 
0 # Niccolo Barbero 2019-04-05 09:34
Hi Kaloyan it's very cool, the only issue it's with arnold 4 you don't have "coat" and "trasmission" stuff but istead you have reflection and refraction so you could update the script with arnokd v4 or arnold v5 presets.
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!!
 
 
+1 # Kaloyan Ganev 2019-04-15 23:11
Hi Niccolo, thanks for your feedback!
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!
 
 
0 # Wes Heo 2021-02-19 21:25
Thank you Kaloyan, this is so cool!

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?
 
 
+4 # Steve Hansen 2021-07-06 21:42
Greetings! Having trouble unpacking EXRs from VRay 5 into Nuke 13. Regardless of settings it will only unpack one AOV with the older version of the shuffle node and places a random backdrop node unmaximized just to the left of the node with nothing inside. Love the concept and thanks for any help you can provide!
 
 
+1 # Faizan Khan 2022-02-18 07:01
Its not working in Nuke 13.1v.1 (Menu.py error is showing Which is
" .nuke/menu.py", line 10, in
import LayerShuffler
ModuleNotFoundError: No module named 'LayerShuffler')"

please update this for latest release.
 
 
0 # Billy Jin 2022-05-26 08:23
Traceback (most recent call last):
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.
 
 
0 # Andy Shindin 2022-11-10 20:52
Please update to the Python 3 ))
 
 
0 # Philipp Moede 2022-11-10 22:58
super Nice Work any chance you can get this working in Nuke 13.1 ?
 
 
0 # Philipp Moede 2022-11-10 22:58
super Nice Work any chance you can get this working in Nuke 13.1 ?
 
 
+5 # Kaloyan Ganev 2022-11-11 18:04
Hello everyone.

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!
 
 
0 # guido pagotto 2022-12-16 18:25
helllo this tool is amazing, did you consider to use nuke trial to update at the last p3 ? thank you
 
 
+3 # Michael McReynolds 2023-01-12 03:56
Thanks for this amazing tool Kaloyan. I hope you get an opportunity to work with a full commercial licensed version soon.
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.
 
 
+3 # Michael McReynolds 2023-01-12 05:06
It didn't look too hard to update this script to the most recent shuffle node (shuffle2) as well, so I went ahead and knocked it out.

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.
 
 
0 # Amr Osama 2023-05-21 21:57
Great Work it works with the new shuffle now
Thank You
 
 
0 # Peter Lau 2023-09-24 09:33
Will it run on Nuke 13 version?
 

You have no rights to post comments

We have 2614 guests and 146 members online