Plugin to Manage Nuke Plugins using json files without the need to touch any files like the init.py file for testing and using nuke plugins.
Just download/clone the PluginManager and add the following code to <user home directory>/.nuke/init.py
import sys
pathToPluginManager = PATH_TO_THE_PLUGIN_MANAGER_FOLDER # example: 'C:/Documents/Nuke/PluginManager'
sys.path.append(pathToPluginManager)
import pluginManager
pluginManager.init(silent=False)
The silent flag can be used to print the path of the loaded plugin directories at startup (if set to False).
To add plugins just create a new json File (like the examples) in the plugin folder.
Example json file structure:
{
"enable": true,
"expessionEnvs" : [],
"env": [
{
"<NAME_OF_PLUGIN>": "<PATH_TO_PLUGIN>"
}
],
"plugin_path": "$<NAME_OF_PLUGIN>"
}
The parsers adds all environment variables env to the environement Variables and adds the plugin (folder) at the plugin_path location.
All keys are optional.
Json Keys | description |
---|---|
enable | (boolean/string) Flag if the plugin should be enabled. Can be a simple expression like: nuke.NUKE_VERSION_MAJOR==13 |
expessionEnvs | (string) Python expresion which will be evaluated on runtime, eg. to determine the nuke version used |
env | (list of dict with strings) Environment variables like the path to the plugin or multiple subpathes or other environment variables |
plugin_path | (string) The path to the plugin which should be appended to the nuke plugin pathes |
Note: if the environment key is PYTHONPATH, the value will be appended to the sys path on startup. This way exteral libraries can be added on startup.
Note: A definition can also be used to only add environment variables on start up. See: examplePlugins/env.json
For the example Plugins the corresponding websites can be found here:
- Crypto Matte https://github.com/Psyop/Cryptomatte
- DeepC https://github.com/charlesangus/DeepC
- jsAssetBrowser https://github.com/jonassorgenfrei/AssetBrowser
- RemoveCannels https://github.com/Ahuge/Nuke-RemoveChannels