I love to keep my nodegraph tidy and organize, so I use to pack nodes related to certain tasks in backdrops with titles. I don’t like the randomness of the backdrop color that Nuke has by default. I created a hotkey (Shift+1) and linked this script to it.
This script creates a backdrop with certain default attributes (color and label, in this case) grouping a node selection, allowing me to organize my nodegraph quicker.
def bg_preset01(): selNodes = nuke.selectedNodes() nodeGroup = [] for nodes in selNodes: nodeGroup.append(nodes.name()) bg = nuke.createNode('BackdropNode', inpanel=False) bg['tile_color'].setValue(3132799489) bg['label'].setValue('<center>') bg['note_font_size'].setValue(50) padding = 50 bgX = min([nuke.toNode(i).xpos() for i in nodeGroup]) - padding bgY = min([nuke.toNode(i).ypos() for i in nodeGroup]) - padding bgW = max([nuke.toNode(i).xpos() + nuke.toNode(i).screenWidth() for i in nodeGroup]) - bgX + padding bgH = max([nuke.toNode(i).ypos() + nuke.toNode(i).screenHeight() for i in nodeGroup]) - bgY + padding bg['xpos'].setValue(bgX) bg['ypos'].setValue(bgY) bg['bdwidth'].setValue(bgW) bg['bdheight'].setValue(bgH)