Getting started with Nuke plugins

Where to Place the Gizmo File

(note: "~" is short hand for the current user's home directory)

You can place .gizmo files in any directory, but common options are:

  • ~/.nuke/
    (user-specific, will be automatically sourced by Nuke on startup)

  • ~/.nuke/gizmos/
    (recommended subfolder to keep things tidy, this will have to be added manually  - see below)

  • A shared location (for teams), like:
    /studio/pipeline/nuke/gizmos/
    $NUKE_PATH/gizmos/

Register custom tool folders in init.py

Nuke will automaitcally scan the ~/.nuke folder, so you can place a init.py file there to customise how you want to organise tools, e.g.:

Create or edit this file ~/.nuke/init.py to add custom folders like this:

nuke.pluginAddPath('./gizmos')  # relative path
# or
nuke.pluginAddPath('/absolute/path/to/gizmos')  # absolute path

You can add multiple paths, e.g.:

nuke.pluginAddPath('./gizmos')
nuke.pluginAddPath('./python')
nuke.pluginAddPath('./plugins')

Load Gizmo without UI integration

With the gizmo installed you can use File/Comp Script Command(hotey "x") to load the gizmo by name.

Use Gizmo with temporary UI Integration

With the gizmo installed, in the toolbar go to Other/All plugins and click "Update"

Go back to the Other/All plugins menu to find all plugins that Nuke can find in it's plugin path sorted by name.

This is only valid for the current session and will also affect the tab menu so is usually not recommended other than for debugging.

Add Gizmo to Nuke’s UI

Edit menu.py to add the gizmo to a custom menu, e.g.:

toolbar = nuke.menu("Nodes")
my_menu = toolbar.addMenu("MyGizmos")
my_menu.addCommand("MyBlur", "nuke.createNode('MyBlur')")

You can also assign icons and hotkeys:

my_menu.addCommand("MyBlur", "nuke.createNode('MyBlur')", icon="Blur.png", shortcut="Ctrl+Alt+B")