An open API service indexing awesome lists of open source software.

https://github.com/jonassorgenfrei/nukepluginmanager

Manage Nuke Plugins by json files
https://github.com/jonassorgenfrei/nukepluginmanager

foundry-nuke nuke

Last synced: 6 months ago
JSON representation

Manage Nuke Plugins by json files

Awesome Lists containing this project

README

          

# NukePluginManager

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.

## Install
Just download/clone the PluginManager and add the following code to ```/.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).

## Using
To add plugins just create a new json File (like the examples) in the plugin folder.

Example json file structure:

```
{
"enable": true,
"expessionEnvs" : [],
"env": [
{
"": ""
}
],
"plugin_path": "$"
}
```

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

## Examples
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