NUKE TOOL: AUTOMATE PLUGINS WITH NUKESHARED

September 2017

NukeShared is an easy to use plugin manager for Nuke, so you won't have to manually install plugins, gizmo's, or anything else anymore.
Simply place the files to install in right folder, and NukeShared will install them correctly in Nuke (with icons, subgroups and everything).

NukeShared does the following:

 

  • 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).
  • Items will be grouped if they are in subdirectories.
  • 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 files (e.g. '/Required/user_activity/JohnSmith.dat') every time users start Nuke with NukeShared installed.
  • Users can be (temporarily) excluded from a shared repository (blacklisting)
  • My QuickShortcutEditor plugin comes pre-loaded, so assigning new keyboard shortcuts is easy.

 

 

Simply adding stuff to the 'Nodes' folder will load them in Nuke:

gizmo script auto install

install gizmo automatically

Nuke py nk gizmo dll so dylib how to install

nuke auto install nodes

 

 

How it works:

 

NukeShared comes with two folders: Repository, and Required.
Required contains the files that NukeShared needs to funcion properly, and the Repository is where you can drop all of your plugins and scripts.

In the Repository, you'll find these folders:

 

auto install nuke gizmo

 

 

The ones starting with an underscore are specific to NukeShared, and the others are corresponding to Nuke menu's.

Generally speaking, gizmo's and scripts and most things you download can be dumped in the 'Nodes' folder.
That's the toolbar on the left of the screen in Nuke.

If a plugin comes with a bunch of files (for instance Cryptomatte or PixelFudger), just drop it in the _AutoInstaller folder!

 

Here's an explanation for all the other folders:

 

_AutoInstaller

All folders and subfolders in this folder will be loaded to Nuke, but not to the UI and only if they have a menu.py or init.py in them.
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 will install it.

_Autorun

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

_Fonts

If there's more than one file in this folder or one of its subfolders, the Nuke script will have set its Font folder in the project settings to this path.
This way, the Text node can find all fonts in that folder (and all of its subfolders).

_Shortcuts

Change the contents of the file 'change_shortcuts_here.txt' to quickly remap Nuke's keyboard shortcuts.
(See that file for more information.)

_ViewerProcesses

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

 

All content of the other folders will be loaded and added to the UI in the right menu according to the folder name
(see this page by The Foundry for all menu locations in Nuke).

E.g. 'Nodes' is the one you should place your gizmo's in, in order to have them on the left of the screen and in the TAB menu.
'Nuke' is the menu bar on the top of the screen, and 'Viewer' is the right-click menu in the viewer.

nuke plugin loader shared

Here are some examples to explain some of the other folders (besides the 'Nodes' one).

 

 

Adding this gizmo to the '_ViewerProcesses' folder works as follows:

nuke plugin repository

gizmo installation plugin

 

 

Adding stuff to the 'Nuke' folder:

install plugins nuke

 

 

Adding stuff to the 'Animation' folder:

gizmo install

Installation

How to install NukeShared:

 

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. On each computer you want to be linked with this repository, add the following line to your .nuke/init.py file (or create the file if it doesn't 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

3. That's it! Now you can start filling up the library in the NukeShared/Repository/ folder.
Additional settings for NukeShared can be found in the NukeShared/Required/init.py-file.

Some more information

Some tricks to make installing plugins easier:

  • Place a file called "openfolderbutton.dat" in a folder to add a "Open plugin directory"-button for that item (this will open the file browser at that location).
  • Place a file called "ignore.dat" in a folder with plugins, and that folder will be skipped when NukeShared is scanning all folders. Subdirectories will not be skipped.
  • When "CACHED" is enabled in the settings, Nuke will write two cache files on startup. These are called "Required/cache_init.py" and "Required/cache_menu.py", and they can be opened in a text editor to copy all automatically generated Python script NukeShared makes under the hood.
    It doesn't really make loading Nuke that much faster if you have a normal amount of plugins, but if you don't like every Nuke startup to scan a directory (especially on servers) then this will make sure only 1 in, for example, 20 computers, will do that task (this amount can be changed in the init.py file).

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