Pyblish integration for The Foundry Nuke 8-15.
What is included?
A set of common plug-ins and functions shared across other integrations - such as getting the current working file. It also visually integrates Pyblish into the File-menu for easy access.
pyblish-nuke depends on pyblish-base and is available via PyPI.
$ pip install pyblish-nuke
To get started using pyblish-nuke, run
setup() at startup of your application.
# 1. Register your favourite GUI import pyblish.api pyblish.api.register_gui("pyblish_lite") # 2. Set-up Pyblish for Nuke import pyblish_nuke pyblish_nuke.setup()
There are two options in the file menu to publishing with:
Publish: Publishing with a silent non-GUI publish, which is fast but does not show the registered GUI.
Publish...: Publishing with the registered GUI.
It is recommended that you allow Pyblish to load upon launching Nuke. For this, you have two options.
- Add the above snippet to your
.nuke/menu.pyin your home directory.
- Add the
pyblish_nuke/nuke_pathdirectory to your
As you will find, this directory contains a
menu.py with the same command. Nuke will run this upon startup, along with any other
Under the hood
setup() command will:
- Register Nuke related "hosts", allowing plug-ins to be filtered accordingly.
- Register a minimal set of plug-ins that are common across all integrations.
Manually show GUI
The menu-button is set to run
show(), which you may also manually call yourself, such as from a shelf-button.
import pyblish_nuke pyblish_nuke.show()
Should you not want a menu-item, pass
import pyblish_nuke pyblish_nuke.show(menu=False)
Should you want to dock the pyblish UI, there is a convenience function to help.
import pyblish_nuke window = pyblish_nuke.show() pyblish_nuke.dock(window)
To get rid of the menu, and completely remove any trace of pyblish-nuke from your Nuke session, run
import pyblish_nuke pyblish_nuke.teardown()
This will do the opposite of
setup() and clean things up for you.
In the event that no GUI is registered upon running
setup(), the button will provide the user with this information on how they can get up and running on their own.
You can customize the integration with these environment variables:
||Hotkey for executing