Custom Scripts I: Quick value changers

These two scripts allow to change the value of a certain knob to a selection of nodes or to all nodes of a certain class.

Change value to a class:

def change_all_class():
    change_all_panel = nuke.Panel('Change value to a class')
    change_all_panel.addSingleLineInput('Node class', '')
    change_all_panel.addSingleLineInput('Knob', '')
    change_all_panel.addSingleLineInput('Value', '')
    if not change_all_panel.show():
        return
    panel_node = change_all_panel.value('Node class')
    panel_knob = change_all_panel.value('Knob')
    panel_value = int(change_all_panel.value('Value'))
    for node in nuke.allNodes(panel_node):
        node[panel_knob].setValue(panel_value)

You can launch this script just copying it in Nuke’s Script Editor and executing this command: Continue reading “Custom Scripts I: Quick value changers”

Menu.py customization

I have spent some time this last month learning some basic Python and learning how to customize Nuke in order to improve my productivity. Apart from little scripts that I have created (which I will share in next posts), I found that configuring nodes’ default values in the meny.py file is a very powerful way to start making things easier.

For those who are not familiar with Python, don’t be afraid. Customizing Nuke’s nodes default values only require this command: Continue reading “Menu.py customization”