Label and Autolabel in Nuke

Label and Autolabel in Nuke

Customize the Label and Autolabel of your nodes in Nuke

In this tutorial you will learn how to set the Label and Autolabel in Nuke with Python

You can download all the Files here:
Download Examples Download Panel

Useful Links



Let's start creating a node, for example a Blur node.
If you want to modify the Label, please open the Properties of the node, under the tab Node and insert this string in the Label knob.

size [value size]

This is the result:


In Nuke, there is a hidden knob called Autolabel. You can modify the Autolabel with Python easily.
We can take always the same Blur node. In this case we want to remove the text (All) from the node, so open the Script Editor and execute this code:


Otherwise, select the node and execute this other code. Result will be the same.


You can use this code with more Nodes together. Just select them and execute this code:

n = nuke.selectedNodes()
for p in n:

Python Panel

In this case you can create a Panel where insert directly the Label, without open the Properties of the node. In the second example you can modify the Autolabel.

#Label - Python panel
label = nuke.getInput('Change label', 'new label')
if label:
    for n in nuke.selectedNodes():

#Autolabel - Python panel
autolabel = nuke.getInput('Change autolabel', 'new autolabel')
if autolabel:
    for n in nuke.selectedNodes():
        n['autolabel'].setValue("nuke.thisNode().name() + \"\\n\" +  '(' + autolabel + ')' ")


Download Examples

  • 1. To set Autolabel equals to the name of the selected node

Usually when you create a Gizmo with a Pulldown Choice menu, it is added automatically to the Autolabel of the node. In this case you can reset the Autolabel, keeping only the name of the node.

#Select any node
n = nuke.selectedNode()
  • 2. Add value of knob "white" to the Autolabel in the Grade node
#Select Grade nodes
n = nuke.selectedNodes()
for p in n:
    p['autolabel'].setValue("nuke.thisNode().name() + \"\\n\" + '(' + str(nuke.thisNode()['white'].value()) + ')' ")

  • 3. Add value of knob "filter" to the Autolabel in the Blur node
#Select Blur nodes
n = nuke.selectedNodes()
for p in n:
    p['autolabel'].setValue("nuke.thisNode().name() + \"\\n\" + '(' + nuke.thisNode()['filter'].value() + ')' ")

  • 4. Add value and name of knob "size" to the Autolabel in the Blur node
#Try this with a Blur Node and print it out the name of the knob and the relative value
n = nuke.selectedNodes()
for p in n:
    p['autolabel'].setValue("nuke.thisNode().name() + \"\\n\" + '(' + str(nuke.thisNode()['size'].name()) + ' '  + str(nuke.thisNode()['size'].value()) + ')' ")

  • 5. Customize Autolabel with If...else... condition

In this case, I'm going to check the value of the gain (actually the name of the knob is 'white'). If the value is > 1, then Autolabel will be 'lighter', otherwise will be 'darker'.

#Try this with the Grade node 'Grade1'
autoLabel = "nuke.thisNode().name() + (' lighter' if nuke.thisNode()['white'].value()>1 else ' darker')"
  • 6. add Autolabel

With addAutolabel, you can add an Autolabel every time that you create a node of the same Class. In this example, every time that we create a Transform node, you will see the Autolabel. If scale is > 1 then it will print 'big' and if the scale is < 1 'small'.
Here you can read more information

#When you create a Transform node, every time you will see this autolabel
def TransformLabel():
    n = nuke.thisNode()
    if n.Class() == "Transform":
        autoLabel = + (' big' if n['scale'].value()>1 else ' small')
        if n['label'].value():
            autoLabel = autoLabel + '\n' + str(n['scale'].value())
        return autoLabel

You can insert this function in your (or any python modules that are imported). You can have multiple autolabel handlers so you don’t need to cover all node classes in one function.


In this example you can change Label and/or Autolabel of your selected node with this Custom Panel in If you want more information about this topic, please visit these pages:

Download Panel

Please download the zip file, uncompress it and find the file . Now the easiest way to install this file is to place the file manually:

Windows: C:\Program Files\Nuke10.0v1\lib\site-packages
Linux: /usr/local/Nuke10.0v1/lib/python2.7/site-packages
macOS: /Applications/Nuke10.0v2/

Now you will find other 2 files: interface.ui and Place these files on your Desktop, for example and insert the correct path in the file

#insert the path where you can find the file interface.ui
file_interface = os.path.join("/Users/myName/Desktop/", "interface.ui")

Ok, perfect! Open Nuke, select a file and execute in the Script Editor file

import os
import io
#please, insert file in this folder:
#Windows: C:\Program Files\Nuke10.0v1\lib\site-packages
#Linux: /usr/local/Nuke10.0v1/lib/python2.7/site-packages
#macOS: /Applications/Nuke10.0v2/


from Qt import QtWidgets
from Qt import QtCompat
from Qt import QtGui

#insert the path where you can find the file interface.ui
file_interface = os.path.join("/Users/myName/Desktop/", "interface.ui")

#create the list of the knobs of the selected node
list = []
def create_list_knobs():

    del list[:]
    global node
    node = nuke.selectedNode()
    for knob in node.knobs().values():
        if (knob.label()!= "INVISIBLE" and knob.label()!= "panel dropped state"):
                #list.append(knob.label() + " - " +

    #order of the list



class MyWindow(QtWidgets.QMainWindow):
    def __init__(self, parent=None):
        super(MyWindow, self).__init__(parent)
        self.main_widget = QtCompat.loadUi(file_interface)

    def load_ui(self): = self.main_widget.findChild(QtWidgets.QComboBox, "knob_ComboBox")
        self.input = self.main_widget.findChild(QtWidgets.QLineEdit, "input_Text")
        self.label = self.main_widget.findChild(QtWidgets.QRadioButton, "label_radioButton")
        self.autolabel = self.main_widget.findChild(QtWidgets.QRadioButton, "autolabel_radioButton")
        self.button = self.main_widget.findChild(QtWidgets.QPushButton, "create_Button")
        self.clear = self.main_widget.findChild(QtWidgets.QPushButton, "clear_Button")

#QPushButton clicked

#print QComboBox

#print QLineEdit
#print self.input.text()

    def check_values(self):
        if (self.label.isChecked()):
            knob = "label"
            knob = "autolabel"
        if (self.input.text() == "" and knob == "label"):
            value = "[value " + + "]"
        elif (self.input.text() == "" and knob == "autolabel"):
            value =
            node['autolabel'].setValue("nuke.thisNode().name() + \"\\n\" + '(' + '" + value + "' + ' ' + str(nuke.thisNode()['" + value + "'].value()) + ')' ")
        elif (self.input.text() is not "" and knob == "autolabel"):
            value = self.input.text()
            node['autolabel'].setValue("nuke.thisNode().name() + \"\\n\" + '(' + '" + value + "' + ')' ")
        elif (self.input.text() is not "" and knob == "label"):
            value = self.input.text()


def show_window():
    global my_window
    my_window = MyWindow()

#clear the window
def clear():


Insert the text that you want or select a knob. Choose if you want to add this new element to the Label or Autolabel and press Create.
If you change the selected node or if you want to reset the Panel, please click on the button Clear Window

Leave a comment