Skip to content

pyblish/pyblish-nukeassist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pyblish integration for The Foundry NukeAssist.




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.




Installation

pyblish-nukeassist depends on pyblish-base and is available via PyPI.

Ensure Pyblish for NukeAssist is on your PYTHONPATH and run this within NukeAssist.

import pyblish_nukeassist
pyblish_nukeassist.setup()

You may also want to consider a graphical user interface, such as pyblish-qml or pyblish-lite. You can then show the Pyblish graphical user interface by calling show().

pyblish_nukeassist.show()



Persistence

It is recommended that you allow Pyblish to load upon launching NukeAssist. For this, you have two options.

  1. Add the following snippet to your .nuke/menu.py in your home directory:
# 1. Register your favourite GUI
import pyblish.api
pyblish.api.register_gui("pyblish_lite")

# 2. Set-up Pyblish for NukeAssist
import pyblish_nukeassist
pyblish_nukeassist.setup()
  1. Add the pyblish_nukeassist/nuke_path directory to your NUKE_PATH environment variable

As you will find, this directory contains a menu.py with the same command. Nuke will run this upon startup, along with any other menu.py available.




Documentation




Under the hood

The setup() command will:

  1. Register Nuke related "hosts", allowing plug-ins to be filtered accordingly.
  2. 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_nukeassist
pyblish_nukeassist.show()



No menu-item

Should you not want a menu-item, pass menu=False.

import pyblish_nukeassist
pyblish_nukeassist.show(menu=False)



Dockable GUI

Should you want to dock the pyblish UI, there is a convenience function to help.

import pyblish_nukeassist
window = pyblish_nukeassist.show()
pyblish_nukeassist.dock(window)



Teardown pyblish-nukeassist

To get rid of the menu, and completely remove any trace of pyblish-nukeassist from your Nuke session, run teardown().

import pyblish_nukeassist
pyblish_nukeassist.teardown()

This will do the opposite of setup() and clean things up for you.




No GUI

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.

image

image

image

Environment Variables

You can customize the integration with these environment variables:

Environment Variable Description Examples
PYBLISH_HOTKEY Hotkey for executing File > Publish. The hotkey is not case-sensitive. You can read more about it here. ctrl+p, Ctrl+Alt+P, CTRL+SHIFT+P

Releases

No releases published

Packages

No packages published

Languages