Installing

The Nomenclator plugin can be installed for Nuke, Nuke Studio and Hiero.

Installing for Nuke

Copy the Python module ./source/nomenclator into your personal ~/.nuke folder (or update your NUKE_PATH environment variable) and add the following menu.py file:

# -*- coding: utf-8 -*-

import nuke

import nomenclator

menu_bar = nuke.menu("Nuke")
menu = menu_bar.addMenu("&File")
menu.addCommand("Nomenclator - Manage Comp...", nomenclator.open_comp_manager_dialog, index=0)
menu.addCommand("Nomenclator - Manage Outputs...", nomenclator.open_output_manager_dialog, index=1)
menu.addCommand("Nomenclator - Settings...", nomenclator.open_settings_dialog, index=2)
menu.addSeparator(index=3)

This is how the menu should look like within Nuke:

Nuke Menu

Note

Download the starter script

Installing for Hiero / Studio

Copy the Python module ./source/nomenclator into a ~/.nuke/Python/StartupUI folder (or update your HIERO_PLUGIN_PATH environment variable) and add the following menu.py file:

# -*- coding: utf-8 -*-

import hiero.ui

import nomenclator
from nomenclator.vendor.Qt import QtWidgets


parent = hiero.ui.mainWindow()

action1 = QtWidgets.QAction("Nomenclator - Manage Project...", parent)
action1.triggered.connect(nomenclator.open_project_manager_dialog)

action2 = QtWidgets.QAction("Nomenclator - Settings...", parent)
action2.triggered.connect(nomenclator.open_settings_dialog)

target_action = hiero.ui.findMenuAction("foundry.menu.file")
menu = target_action.menu()
separator = menu.insertSeparator(menu.actions()[0])
menu.insertActions(separator, [action1, action2])

This is how the menu should look like within Hiero or Nuke Studio:

Hiero Menu

Note

Download the starter script

Installing from source

You can also install manually from the source for more control. First obtain a copy of the source by either downloading the zipball or cloning the public repository:

git clone git@github.com:buddly27/nomenclator-nuke.git

Note

Using Virtualenv is recommended when evaluating or running locally.

Then you can build and install the package into your current Python environment:

pip install .

If actively developing, you can perform an editable install that will link to the project source and reflect any local changes made instantly:

pip install -e .

You can then install the starter scripts for Nuke and Hiero as referred in the two previous sections to use it.

Note

If you plan on building documentation and running tests, run the following command instead to install required extra packages for development:

pip install -e ".[dev]"

Building documentation from source

Ensure you have installed the ‘extra’ packages required for building the documentation:

pip install -e ".[doc]"

Then you can build the documentation with the command:

python setup.py build_sphinx

View the result in your browser at:

file:///path/to/nomenclator-nuke/build/doc/html/index.html

Running tests against the source

Ensure you have installed the ‘extra’ packages required for running the tests:

pip install -e ".[test]"

Then run the tests as follows:

python setup.py -q test

You can also generate a coverage report when running tests:

python setup.py -q test --addopts "--cov --cov-report=html"

View the generated report at:

file:///path/to/nomenclator-nuke/htmlcov/index.html

Managing External dependencies

The Nomenclator plugin rely on two external dependencies:

  • toml to read Toml configuration files.
  • Qt.py to preserve compatibility between PySide (used in Nuke 11 and earlier) and PySide2 (used in Nuke 12 and later).

For convenience, specific versions of these libraries are embedded in the plugin using the vendoring CLI tool. These versions are defined in the source/nomenclator/vendor/vendor.txt file:

Qt.py==1.3.5
toml==0.10.2

To update the versions, modify this file and run the following command:

vendoring update .