About
The NodeGraphBuddy is a series of python scripts designed to make working in the Node Graph (DAG) quicker and easier. It focuses mostly on aligning, distributing, mirroring and scaling nodes, but has many other fun features as well!
Download the BuddySystem plugin from Nukepedia to get all the scripts on this page, as well as the production tested Buddy Tools!
Contents
Info
Adjust Nodes
Distribute | Align
Hotkey
Asterisk(*)
About
This is a two stage script that can distribute, and then align nodes
How It Works
On first press of the hotkey: Distribute nodes horizontally/vertically
On second press of the hotkey: Align nodes horizontally/vertically (if already distributed)
Direction: is determined by the selections DAG bounding box. If it is wider than tall, the script will run in horizontal mode. If it is taller than wide, the script will run in Vertical mode
Demo Video
Distribute | Align By Cluster
Hotkey
Shift+Asterisk(*)
About
This is a two stage script that can distribute, and then align nodes by cluster. A cluster of nodes is considered as a group of connected nodes.
How It Works
On first press of the hotkey: Distribute nodes horizontally/vertically
On second press of the hotkey: Align nodes horizontally/vertically (if already distributed)
Direction: is determined by the selections DAG bounding box. If it is wider than tall, the script will run in horizontal mode. If it is taller than wide, the script will run in vertical mode
Demo Video
Align | Stack | Match
Hotkeys
Right Arrow, Left Arrow, Up Arrow, Down Arrow
About Align | Stack
This is a contextual, multi function script that can align nodes, stack them close together. Alignment is based on a reference node, so you can always control what to align too
How Align | Stack Works
Align Vertically: Use either the Left or Right arrows to align nodes to the reference nodes vertical axis (x position)
Align Horizontally: Use either the Up or Down arrows to align nodes to the reference nodes horizontal axis (y position)
Stack Vertically: Use Up Arrow to stack below the highest node in the selection, Use Down Arrow will stack above the lowest node in the selection
Stack Horizontally: Use Left Arrow to stack to the right of the left most node in the selection. Use Right Arrow to stack to the left of the right most node in the selection
Reference Node: This is the last node you select. It will act as the reference for alignment of all other nodes selected
Demo Video
About Match (Backdrops Only)
With most nodes we want to align them by their centers, but not with backdrops, which we want to align by their edges. This script has a separate alignment mode that runs if backdrop nodes are selected to accomplish this. Additionally it has a Match backdrop width/height function, which will run if the alignment is already done, and only backdrops are selected
How Backdrop Align | Match Works
Align Vertically: Use either the Left or Right Arrows to align backdrops to the reference nodes vertical axis (x position)
Align Horizontally: Use either the Up or Down Arrows to align backdrops to the reference nodes horizontal axis (y position)
Match Backdrop Height: After a horizontal alignment is performed, use either the Up or Down Arrows to match backdrops height to the reference backdrop
Match Backdrop Width: After a vertical alignment is performed, use either the Left or Right Arrows to match backdrops width to the reference backdrop
Reference Backdrop: This is the last node you select. It will act as the reference for alignment/matching of all other backdrop nodes selected
Demo Video
Align Upstream
Hotkey
Page Up
About
This script will align all nodes upstream from the selected node vertically (x position), space them to prevent overlaps, and finally select them for easy manipulation post alignment
How It Works
Align Upstream: Select a single node and press Page Up. The script will then walk up the input 0 of each connected node until it reaches one of the end conditions
End Condition #1: There are no more input 0s, or the connection ends. I.E. a read node, or unconnected node
End Condition #2: There is a perfect right angle (90 degree) turn in the pipe. If the script hits one of these it assumes you don’t want to align any further
End Condition #3 There is Stamp node found. Since Stamps use hidden inputs, we stop alignment at them
Demo Video
Mirror Horizontally/Vertically
Hotkeys
Alt+M, Ctrl+Alt+M
About
This script mirrors selected nodes, using a reference node as the center point. It treats backdrops differently than normal nodes, so you can mirror an entire node tree if required
How It Works
Mirror Horizontally: Select a group of nodes and press Atl+M. The script will mirror everything selected using the reference nodes x position
Mirror Vertically: Select a group of nodes and press Ctrl+Atl+M. The script will mirror everything selected using the reference nodes y position
Reference Node: This is the last node you select. It will act as the reference for mirroring of all other nodes selected
Demo Video
Resize Backdrop To Nodes
Hotkey
Ctrl+Alt+Shift+Asterisk(*)
About
This script will resize the selected backdrop to fit around the selected nodes. It also adds 100 units of extra padding for labels and general workspace
How It Works
Resize Backdrop: Select backdrop and other nodes, then press Ctrl+Alt+Shift+Asterisk(*) It’s worth noting that it can resize around other backdrops, just make sure the backdrop you want to resize is the last one selected
Demo Video
Backdrop Sort Z Order
Hotkey
Ctrl+Alt+Shift+Z
About
This script will sort all the selected backdrops by their size and set their z order to match in ascending order. For example if you have a small backdrop under a large backdrop, this will set the smaller backdrop to a higher z order than the larger ones, so it isn’t hidden underneath them
How It Works
Sort Z Order: Select backdrops, then press Ctrl+Alt+Shift+Z
Demo Video
Backdrop Z Order
Hotkeys
Ctrl+Alt+Shift+Plus(+), Ctrl+Alt+Shift+Minus(-)
About
This script increases, or decreases the selected backdrops Z Order
How It Works
Increase Z Order: Select backdrops and press Ctrl+Alt+Shift+Plus(+) to increase their z order by +1
Decrease Z Order: Select backdrops and press Ctrl+Alt+Shift+Minus(-) to decrease their z order by -1
Demo Video
Backdrop Font Size
Hotkeys
Ctrl+Alt+Shift+Page Up, Ctrl+Alt+Shift+Page Down
About
This script increases, or decreases the selected backdrops label/font size
How It Works
Increase Font Size: Select backdrops and press Ctrl+Alt+Shift+Page Up to increase their font size by +10
Decrease Font Size: Select backdrops and press Ctrl+Alt+Shift+Page Down to decrease their font size by -10
Demo Video
Scale Nodes
Scale Biased
Hotkeys
Ctrl+Shift+Right Arrow, Ctrl+Shift+Left Arrow, Ctrl+Shift+Up Arrow, Ctrl+Shift+Down Arrow, Ctrl+Shift+Plus(+), Ctrl+Shift+Minus(-), Ctrl+Shift+Home
About
This script allows you to quickly scale nodes with a bias to one edge of the selection. The scale amount is based on your node graph zoom level, so if you are zoomed out a lot, it will scale a lot, and if you zoom in close, it will scale a little. Things like backdrops and dots will also scale correctly. The bias can be changed by opening the settings
How It Works
Increase Width Biased: Select nodes and press Ctrl+Shift+Right Arrow to increase their width away from the left side of the selection
Decrease Width Biased: Select nodes and press Ctrl+Shift+Left Arrow to decrease their width towards the left side of the selection
Increase Height Biased: Select nodes and press Ctrl+Shift+Down Arrow to increase their height away from the top side of the selection
Decrease Height Biased: Select nodes and press Ctrl+Shift+Up Arrow to decrease their height towards the top side of the selection
Increase Width & Height Biased: Select nodes and press Ctrl+Shift+Plus(+) to increase their width and height away from the top left corner of the selection
Increase Width & Height Biased: Select nodes and press Ctrl+Shift+Minus(-) to decrease their width and height towards the top left corner of the selection
Open Settings: Press Ctrl+Shift+Home to change the side to bias to. Changing from left to right or top to bottom will invert the above hotkeys to maintain logical consistency
Demo Video
Scale Center
Hotkeys
Shift+Right Arrow, Shift+Left Arrow, Shift+Up Arrow, Shift+Down Arrow, Shift+Plus(+), Shift+Minus(-)
About
This script allows you to quickly scale nodes from the center of the selection. The scale amount is based on your node graph zoom level, so if you are zoomed out a lot, it will scale a lot, and if you zoom in close, it will scale a little. Things like backdrops and dots will also scale correctly
How It Works
Increase Width Center: Select nodes and press Shift+Right Arrow to increase their width away from the center of the selection
Decrease Width Center: Select nodes and press Shift+Left Arrow to decrease their width towards the center of the selection
Increase Height Center: Select nodes and press Shift+Up Arrow to increase their height away from the center of the selection
Decrease Height Center: Select nodes and press Shift+Down Arrow to decrease their height towards the center of the selection
Increase Width & Height Center: Select nodes and press Shift+Plus(+) to increase their width and height away from the center of the selection
Increase Width & Height Center: Select nodes and press Shift+Minus(-) to decrease their width and height towards the center of the selection
Demo Video
Create Nodes
Create Blur or Backdrop
Hotkeys
B, Shift+B
About
This script allows you to quickly create a Backdrop with the B hotkey, while still allowing you to create a Blur node with the same hotkey. The idea is that you wouldn’t make a blur with 2+ nodes selected, so make a backdrop in that situation instead
How It Works
Create Blur Node: If 0-1 nodes are selected, press B to create a Blur node
Create Backdrop: If 2 or more nodes are selected, press B to create a backdrop around them
Create Backdrop Advanced: If 2 or more nodes are selected, press Shift+B to create a backdrop around them using a panel, that allows for customization and presets
Demo Video
Utilities
Set Node Label
Hotkeys
A
About
This script lets you quickly add/modify a node label via hotkey. The default hotkey is A, but uses the node graph context, so that A in the viewer will still show alpha. It also optionally recenters the node based on the mask input after a label is applied
How It Works
Set Node Label: Select a node and press A, a panel will appear with an input field where you can type in a label, or modify the existing one. Press Enter to set the label
Recenter Nodes: On by default, this will recenter the node in y position, based on the new height after the label is created. You can toggle this feature on/off in the panel
Demo Video
Copy | Paste Reconnect
Hotkeys
Ctrl+Alt+Shift+C, Ctrl+Alt+Shift+V
About
This script lets you copy and paste nodes, while auto reconnecting them after the paste operation. It also works between files, so you can copy a setup from one to another
How It Works
Copy Reconnect: Select nodes and use Ctrl+Alt+Shift+C to copy them with a special script that remembers their inputs
Paste Reconnect: After running Copy Reconnect press Ctrl+Alt+Shift+V to paste the nodes, and auto reconnect their inputs
Demo Video
Paste To Multiple
Hotkeys
Shift+V
About
This script lets paste nodes to multiple selected nodes at once. Useful for adding un/premults to a bunch of reads, or duplicating small setups to different branches
How It Works
Paste To Multiple: After running a normal Copy press Shift+V to paste the contents of your clipboard to all selected nodes
Demo Video
Toggle Disable
Hotkeys
Shift+D
About
This script lets you toggle the disable knob on multiple nodes at once. Useful for testing things, but please don’t leave a bunch of disabled nodes in your files. Remove them, or use switches/dissolves for more permanent toggleable setups
How It Works
Toggle Disable: Select a mix of enabled and disabled nodes and press Shift+D their states will then toggle to the inverse value
Demo Video
Write Node Manager
Hotkeys
Ctrl+Shift+W
About
This script finds all the write nodes in the current file, and displays their info in a panel. Writes are displayed in descending order based on the Render Order by default. Artist can modify some of their knobs directly in the panel, or use it to zoom to the nodes in the node graph, for more complex modifications
How It Works
Write Node Manager Floating: Press Ctrl+Shift+W to launch as a floating panel
Write Node Manager Docked: In any pane go to Windows > Custom > Write Node Manager to launch as a docked panel in that pane
Knob Editing: In the panel any knob that is not greyed out is editable via double click. Some knobs like First/Last only become editable once Limit to range is enabled
Zoom To Node: Double click on the node name to zoom to that write in the node graph, and also edit the node name (if you want)
Demo Video
Nodeoriety - Node Counter
Hotkeys
None
About
This script counts all the nodes in the current file, and builds a panel displaying that information in either a table, or hierarchical layout. I built this to help diagnose large slow scripts and try to diagnose if certain nodes were causing the issues
How It Works
Nodeoriety Floating: In the BuddySystem menu located in the toolbar go to Scripts > Utilites > Panels > Nodeoriety to launch as a floating panel
Nodeoriety Docked: In any pane go to Windows > Custom > Nodeoriety to launch as a docked panel in that pane
Nodeoriety Table View: Shows the node counts in a flat table layout grouped by node type, I.E. node, gizmo, group, etc…
Nodeoriety hierarchical View: Shows the node counts in a hierarchical layout starting grouped at the root level and decending into any groups, gizmos, etc…
Demo Video
Fun
Rotate Nodes
Hotkeys
None
About
This script rotates nodes around the center point of the selection. It has very limited practical uses, and is a result of experimenting with the mirror and scale scripts, so it lives in the fun section for now. If anyone actually finds it useful let me know!
How It Works
Launch Panel: Select two or more nodes, then in the BuddySystem menu located in the toolbar go to Fun > Rotate Nodes to launch as a floating panel
Rotate Nodes: Use the angle slider or type a whole number into the integer knob and press enter to rotate the selected nodes
Ignore Nodes: In the panel toggle the ignore checkboxes to not rotate backdrops/stickynotes, because they rotate kinda of weird
Demo Video
Node Randomizer
Hotkeys
None
About
This script can randomize node positions, colours and knob values. I made it to test the alignment, scale and other utilities, and generally has little use outside of scaring your coworkers and causing general chaos!
How It Works
Launch Panel: In the BuddySystem menu located in the toolbar go to Fun > Node Randomizer to launch as a floating panel
Randomize Position: Use the X and Y Position slider to randomize the nodes. The mode can be changed between all or split for finer control of the chaos
Randomize Colour: Use the Colour integer knob to randomize the selected nodes tile colour
Randomize Knobs: Enable the Randomize Knobs checkbox to randomize the selected nodes knobs. Only knob classes defined in the panel will change. Use min/max/seed to adjust
Demo Video
Caesar Shift Labels
Hotkeys
None
About
This script can apply a Caesar Cipher or shift to selected nodes labels. It can also be used to decode them, so have fun leaving secret messages in your comps!
How It Works
Launch Panel: In the BuddySystem menu located in the toolbar go to Fun > Caesar Shift Labels to launch as a floating panel
Apply Cipher: Use the Shift Amount knob to encrypt the selected nodes labels. The Alphabet text knobs in the panel can help you visualize the Cipher, and decode it
Demo Video
Setup / Installation
Install
import nuke nuke.pluginAddPath('./BuddySystem')
For Pipeline Use
Always speak with your studios pipeline support staff before trying to install anything. Every studio is different, but you’ll likely need to ask them to place the file into a central tool repository so everyone can access it
Modifying Hotkeys
If you don’t like the default hotkeys, or they conflict with ones you already have, you can modify them in the BuddySystems menu.py file. Look for the hotkeys near the end of each buddySystem.addCommand() line
Removing Scripts
If you already have a similar script, or don’t need one of them, you can comment that part out in the BuddySystems menu.py file.
Version History
Versions
About
NodeGraphBuddy is made up of many python scripts, and to help me manage this, as well as the other features tied to the overall BuddySystem, they will be treated as part of the BuddySystem plugin package. This means that if one or more of these scripts changes, or new ones are added, a new version of the BuddySystem will be released. You can find the complete version history on the main BuddySystem page, as well as the release notes
Development Goals
To-Do
Below are some of the things I still would like to do with the tool, if time permits. If there is something you think would be a nice addition, feel free to reach out!
Add more scripts
Add more tools
Add more fun
Contributors
Thanks!
Below are some of the people who helped develop this tool through direct support or indirectly via online resources
Mark Rodziewicz
Sheldon Lisoy
Adam Dent
Chris Fourney
FAQ / Bug Reporter
Frequently Asked Questions
-
Yes!
In the BuddySystem’s unique menu.py file you will find the current hotkeys near the end of each buddySystem.addCommand() line.
If you followed the install directions above that file will be in this directory C:\Users\Hiram\.nuke\BuddySystem\menu.py
Feel free to change them, although I spent a lot of time trying to pick hotkeys that made sense, and don’t conflict with any of the defaults
-
Yes!
In the BuddySystem’s unique menu.py file you will find all the scripts neatly organized the same way they are in the nuke toolbar menu
If you followed the install directions above that file will be in this directory C:\Users\Hiram\.nuke\BuddySystem\menu.py
Feel free to comment out any scripts you don’t require
-
Unless you prefer an older version of the tools, I would remove previous installs, and use the ones packaged with the BuddySystem plugin. They will be more up to date, and will be easier to load into nuke without having to make custom toolsets and hotkeys for each
-
The buddy tools use python scripts to dynamically update their appearance based on user input, and this doesn’t work well with the gizmo format. It’s highly recommended to keep them as grizmos (grouped gizmos) nodes. This modified format is how they are packaged with the BuddySystem, and allows you to TAB create the buddy tools like a gizmo would, while still keeping the unique group features required to function as they do.
-
Good Question!
NodeGraphBuddy is a series of python modules designed to help with working in the Node Graph (DAG) specifically. There could also be ViewerBuddy for the viewer, or CurveEditorBuddy modules down the road…
The BuddySystem on the other hand is the glue that binds all the Buddy tools, Buddy scripts, Hotkeys and other features together, into one easy to install/use plugin package
-
All tools, scripts and features supported in Nuke versions 11.0 - 16.0
Due to major changes in Nuke, Python and PySide some of the panel based scripts won’t work in Nuke versions 10.0 or earlier
Report A Bug
For issues/bugs please provide the following information