MANAGE NUKE PLUGINS USING NUKESHARED
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.
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.
The .nuke folder can be found here:
Mac OS X: /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.
This is what they’re for:
This is where you can place your gizmos, scripts and whatnot! More about how that works down below.
These are the files NukeShared needs to be able to load.
All this python script does is pointing Nuke in the right direction (which is the Required folder).
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).
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.
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:
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.
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.
This path is added as a FONT environment path to Nuke.
This path is added as an OFX environment path to Nuke (if any files/folders are present in the directory).
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!
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.
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:
Adding a gizmo to the ‘_ViewerProcesses’ folder works as follows:
Adding stuff to the ‘Nuke’ folder will add it to the top of the screen:
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:
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
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’.
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.