MANAGE NUKE PLUGINS USING NUKESHARED

September 2017

NukeShared is an easy-to-use plugin manager for Nuke, which makes writing code to install plugins, gizmos, scripts, and any other kind of add-on obsolete.
Simply place the files to install in the right folder, and NukeShared will install them correctly in Nuke with icons, subgroups and much more.

Multiple NukeShared repositories can run simultaneously, they work on render farms, and and can be loaded from servers.

 

  • When you download any kind of Nuke plugin (.gizmo, .nk, .dll, .dylib, .so, .py), simply dropping it in the right folder installs it on Nuke startup.
  • When an image file (png) is next to a plugin and it has the same name, it will become its icon. The same goes for folders.
  • The plugin repository can be placed on a server, so multiple computers can share the same plugins and scripts (which also works on render farms).
  • Writing init.py/menu.py files of what NukeShared is doing under the hood is possible! This way you can ‘cache’ your repository to not be dependent on NukeShared.
  • User logging can be enabled in the settings – this will create a file (e.g. ‘NukeShared/Configuration/user_activity/JohnSmith.dat’) every time a user starts Nuke.
  • Users can be blacklisted.
  • The QuickShortcutEditor script comes pre-loaded in the Repository, so assigning new keyboard shortcuts to menu items and nodes is easy.

Installation

1. Place the entire ‘NukeShared’-folder somewhere you like. Could be on a server, if you want to have multiple computers load their plugins from it.

2. Add the following line to the .nuke/init.py file (change “path/to/NukeShared” to the actual path on your computer!). Create this file if it does not yet exist.

nuke.pluginAddPath(“path/to/NukeShared”)

 

The .nuke folder can be found here:

Linux: /home/<user>/.nuke
Mac OS X: /Users/<user>/.nuke
Windows: \Users\<user>\.nuke

The contents explained

There are three folders in the main NukeShared folder (next to this readme file): Configuration, Repository and Required.
There is also an init.py file.

 

 

 

NukeShared contents

 

 

This is what they’re for:

Folder: Repository

This is where you can place your gizmos, scripts and whatnot! More about how that works down below.

Folder: Required

These are the files NukeShared needs to be able to load.

File: init.py

All this python script does is pointing Nuke in the right direction (which is the Required folder).

Folder: Configuration

In this folder, you can change preferences for NukeShared by editing the contents of the Settings.py file.

You can add files with the name ‘username.dat’ to the user_blacklist folder to completely blacklist these users from NukeShared

See who is using NukeShared by finding the ‘username.dat’ files that appear in the user_activity folder every time someone opens up Nuke
(but only if ‘write_active_user’ is set to True in the settings file).

The repository

automatically install nuke plugins

 

 

 

All folders in the Repository folder refer to a specific panel in Nuke, except for the ones starting with an underscore.

This means that, for instance, dropping some a Python script in the folder called ‘Animation’ will make it appear on the
right-click menu of the Animation knob on all nodes.

 

 

gizmo install

 

 

 

See this page by The Foundry for a list with pictures of all panels in Nuke.
Here is what the other (non-panel) folders are for:

_AutoInstaller

All folders and subfolders in this folder will be loaded to Nuke as a plugin path,
which means init.py and menu.py files are automatically run.
This folder is meant for plugins that have their own set of files – for instance,
simply dragging the entire download folder for Cryptomatte or PixelFudger in there works.

_Autorun

All Python files in this folder and its subfolders will be run on Nuke startup.
There are two subdirectories in this folder that should not be changed or removed: _init and _menu.
Place your scripts in the _init folder to have them run on Nuke startup (before UI is loaded), and in _menu to have them load with the UI.

_Fonts

This path is added as a FONT environment path to Nuke.

_OFXPlugins

This path is added as an OFX environment path to Nuke (if any files/folders are present in the directory).

_OCIO

This path is added as an OCIO environment path to Nuke (if any files/folders are present in the directory).
Keep this folder empty if you do not want to lose Nuke’s built-in configs!

_Shortcuts

Change the contents of the file ‘Keyboard_Shortcuts.txt’ to quickly remap keyboard shortcuts for any item in the ‘Node’ bar on the left or the ‘Nuke’ bar on the top of the screen.

_ViewerProcesses

The gizmo’s in this folder and its subfolders will be registered as Nuke viewerprocesses in the viewer.

 

 

 

 

Simply adding stuff to the ‘Nodes’ folder will load them to the menu bar on the left:

NukeShared repository

NukeShared auto-install gizmos

NukeShared Nuke plugins

 

nuke auto install nodes

 

 

Adding a gizmo to the ‘_ViewerProcesses’ folder works as follows:

NukeShared auto viewerprocess

gizmo installation plugin

 

 

Adding stuff to the ‘Nuke’ folder will add it to the top of the screen:

install plugins nuke

Some more tricks

If you create files with a certain name, NukeShared will treat the folder they are in differently.
Simply add a file with the following name to get a certain effect:

ignore.dat

Make NukeShared ignore this folder (not its subdirectories).
Add usernames to this file (one on each line) to exclude them!
Alternatively, you can enter ‘filter_nuke: ‘ or ‘filter_os: ‘, followed by the versions you want to whitelist to the ignore file.
Example line to filter nuke 11.2v3, all versions of nuke 11.3, and nuke 10.5v8:
filter_nuke: 11.2v3 11.3 10.5v8
Example line filtering all three operating systems at the same time:
filter_os: windows macos linux

autoinstaller.dat

Ignore all the files in the current folder, except for the ‘menu.py’ and ‘init.py’ files.
Basically the same as placing the current folder (without its subdirectories) in ‘_AutoInstaller’.

openfolderbutton.dat

Add an extra item at the end of the current menu in Nuke with the option to open this current folder in the finder/explorer.

If you have any questions/suggestions, let me know!