sbn Align Read Nodes v1.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Sebastian Faber
script to align and sort nuke read nodes in the node graph editor. This is a tool I use EVERY DAY and helps a lot to sort and to compare footage, AOVs and 3D layers.
Requirements:
12.0, 11.3, 11.2, 11.1 or later
Linux, Mac, Windows
26 Apr 2020
300

sbnAlignReadNodes demo Slow 

--- 

  sbnAlignReadNodes_2020 v1.13

--- 

  UDATE!

  17.02.2020

  - this is a new Version! Some minor issues are fixed. Also the installation process should now work on Mac.

  - fixing Issue: 'L' shortcut do not overwrite 'L'- in the viewer playback (Thanks to Johan for this hint)

  SPECIAL THANKS:

   Thanks to Johan Van Huyssteen for his suggestions and bugreporting

-----------------------------------------------------

 

 

script to align and sort nuke read nodes in the node graph editor.

- read nodes are aligned horizontally, zig zag, vertically or as 'wave'
- read nodes are also sorted in ALPHABETICAL order from left to right
- toggle between horizontal and 'zig zag' alignment in order to read long AOV file names 


USAGE
-----------
- select read nodes

- press 'L' to align 'zig zag' and press 'L' again to align read nodes horizontally

- press shift+'L' to align read nodes vertically

 


COMMENT
-----------
- if the selection contains other nodes than read nodes nuke's built in autoplace function is used which is asigned to the 'L' key by nuke's default keyboard mapping. So don't worry to override the 'L' key with this tool.


FEEDBACK
-----------
- comments and suggestions are welcome. Please feel free to drop me a line in the comment field.


INSTALLATION - NEW! 
------------

(Windows PC):
- copy the script sbnAlignReadNodes_2019.py to your personal nuke script folder e.g. 'D:/Nukescripts/sbnAlignReadNodes_2019.py'
- open your menu.py and add the following lines:


global glToggleRS; glToggleRS=0

m=nuke.menu('Nodes').addMenu('sbn')
m.addCommand( '.Align Read Nodes ' , 'nuke.load('sbnAlignReadNodes_2020.py'), sbnAlignNodes('default')', 'L', shortcutContext=2)
m.addCommand( '.Align Read Nodes (vertical)' , 'nuke.load('sbnAlignReadNodes_2020.py'), sbnAlignNodes('vertical')', 'shift+L', shortcutContext=2)
m.addCommand( '.Align Read Nodes (horizontal)' , 'nuke.load('sbnAlignReadNodes_2020.py'), sbnAlignNodes('horizontal')', '', shortcutContext=2)
m.addCommand( '.Align Read Nodes (wave)' , 'nuke.load('sbnAlignReadNodes_2020.py'), sbnAlignNodes('wave')', '', shortcutContext=2)
m.addCommand( '.Align Read Nodes (zigzag)' , 'nuke.load('sbnAlignReadNodes_2020.py'), sbnAlignNodes('zigzag')', '', shortcutContext=2)

 - now please restart nuke

 

USAGE
------------

- after installation, select your read nodes and press 'L' or 'shift+L' to align the selected nodes.
- press 'L' or 'shift+L' again to toggle.
- after installation a new icon appears in your toolbar. Press the icon to see all the menu entries of 'Align Read Nodes'

 

ADDITONAL COMMENTS
-----------
- tested on Windows 10 with Nuke 11.x, should also work on MAC and linux.
- written in python

 

 

Please login in order to download these files.

Comments   

 
+1 # Johan van Huyssteen 2019-11-08 13:04
Hi there. I'm having issues with 'Syntax error' messages preventing Nuke from launching up no matter where I point the m.addCommand. My 'snbAlignReadNo des_2019.py' is located one directory down from the menu.py so

'm.addCommand( '.Align Read Nodes ' , 'nuke.load('/py thon/sbnAlignRe adNodes_2019.py '), sbnAlignNodes(' default')', 'L')

should work but it doesn't. Please advise what I might do to get it working?
 
 
0 # Johan van Huyssteen 2019-11-08 14:05
Actually I found the issue. 'nuke.load' needs the plugin name only, not the relative or absolute path. Due to the pluginAddPath being setup properly in my menu.py / init.py I just needed to type:
nuke.load('sbnAlignReadNodes_2019.py') for everything to work correctly.

This is extremely useful. Thank you very much.
 
 
0 # lou cannizzo 2019-11-14 17:03
Yup, same issue. No matter what path I use, I get syntax error line 3. I also tried adding nuke.load into the ini.py as well.
Finally gave up.

Are there any detail instructions to load this?
 
 
+1 # James Rowell 2019-11-15 20:28
Hey Lou - I was having trouble too, I think I found the fix. Look in the actual python script sbnAlignRe adNodes_2019.py for the commented out lines that are supposed to go into your menu.py. They have proper use of double and single quotes. That plus what Johan wrote above, should get it working for you. Cheers J.
 
 
0 # Sebastian Faber 2020-02-19 14:25
Hey guys,
yes you are right! Thanks for your comments. I've updated the tool and changed some minor issues. Now the menu.py entries should also work on Mac. Also the "L" hotkey is now still working in the Nuke Viewer and not overwritten anymore. Please download the new version: sbnAlignReadNodes_2020.py

Also please use the menu.py entries as described in the updated installation procedure.

Special thanks to Johan for his suggestions and reports. Please let me know if you have still any issues or suggestions.

best regards Sebastian
 
 
0 # Bart Barendregt 2020-02-20 10:24
On nuke 11 Linux I'm getting this error whichever way I'm trying to load the plugin:

Traceback (most recent call last):
File "/.nuke/menu.py ", line 55, in
global glToggleRS; glToggleRS
NameError: global name 'glToggleRS' is not defined

any ideas?
 
 
0 # Sebastian Faber 2020-02-20 14:52
please try this:
global glToggleRS; glToggleRS=0
 
 
+1 # Bart Barendregt 2020-02-26 18:10
Thanks! that fixed it.
 
 
0 # Garam You 2021-03-03 01:41
Hi!Thanks for your script. Looks amazing.
I am using Windows and nuke10.0
I wrote down

global glToggleRS,glToggleRS=0

m = nuke.menu('Nodes').addMenu('sbn')
m.addCommand('.Align Read Nodes ', 'nuke.load("sbn AlignReadNodes_ 2020.py")', 'sbnAlignNodes( "default")', "L", shortcutContext=2)
m.addCommand('.Align Read Nodes (vertical)', 'nuke.load("sbn AlignReadNodes_ 2020.py")', 'sbnAlignNodes( "vertical")', "shift+L", shortcutContext=2)
m.addCommand('.Align Read Nodes (horizontal)', 'nuke.load("sbn AlignReadNodes_ 2020.py")', 'sbnAlignNodes( "horizontal")', '', shortcutContext=2)
m.addCommand('.Align Read Nodes (wave)', 'nuke.load("sbn AlignReadNodes_ 2020.py")', 'sbnAlignNodes( "wave")', '', shortcutContext=2)
m.addCommand('.Align Read Nodes (zigzag)', 'nuke.load("sbn AlignReadNodes_ 2020.py")', 'sbnAlignNodes( "zigzag")', '', shortcutContext=2)

and this is not working. I put sbnAlignReadNod es_2020.py in nuke script folder.
It is not working. Can somebody help?
 
 
0 # Sebastian Faber 2021-03-10 08:56
Hello Graham,
thanks for downloading my script. I'll take a look and answer you soon.
 
 
+1 # Sebastian Faber 2021-03-10 21:28
Helllo Graham,

I think there is a type error in your first line. Change the comma to a semicolon and it should work.

the correct command is:

global glToggleRS; glToggleRS=0

(with a semicolon, not a comma)


Please let me know if it works.
 
 
0 # Garam You 2024-01-18 15:02
Sorry for the late reply but it works wonderfully, thanks
 
 
0 # Johan van Huyssteen 2021-07-31 16:01
Still working BEAUTIFULLY in NukeX 13.0v4! :lol:
 
 
+1 # Steve Drew 2022-05-05 18:11
Howdy, great little script!
Two requests - can the nodes align to the grid, if snap to grid is active in the node graph? And, is it possible to have some spacing options, or some auto-detection of node size? For example, vertically aligning several nodes that have a few comments in their label field results in a lot of overlapping nodes.
Thanks!
 
 
0 # Sebastian Faber 2022-05-10 15:11
Hello Steve,

thank you very much for your nice feature requests. I have looked at it and yes, both functions should be possible. I personally always use the horizontal alignment with sbnAlignReadNod es, but you are right, if the read nodes have many annotations, the nodes will overlap after alignment. I will put both functions on my list and I will release a new version as soon as I have time.

Best regards

Sebastian
 

You have no rights to post comments

We have 6042 guests and 56 members online