Commands: The two tcl commands you can add to an init.tcl that will add a plugin directory path are. 1: plugin_addpath 2: plugin_appendpath plugin_addpath: This will add the path to the beginning of Nukes plugin paths. plugin_appendpath: This will add the path to the end of Nukes plugin paths. What is the difference? The difference is if you use plugin_addpath then your preferences.nk and window_layouts.nk file will be saved into this directory since it will be the first directory listed under plugin_path. Example 1: This example will demonstrate having a directory used to store plugins, this plugin directory contains sub-directories one for each version of Nuke. Depending on which version of Nuke is running it will only add the corresponding plugin directory for its version. # Add plugin directory path(s) for user binary plugins. # Set paths based on the version of Nuke being launched. switch [set nuke_version] { "4.6000" {plugin_appendpath "/home/nrgy/.nuke/plugins/NFX/4.6"} "4.7100" {plugin_appendpath "/home/nrgy/.nuke/plugins/NFX/4.7v1"} "4.7200" {plugin_appendpath "/home/nrgy/.nuke/plugins/NFX/4.7v2"} "4.7300" {plugin_appendpath "/home/nrgy/.nuke/plugins/NFX/4.7v3"} } You could even get more creative and have the path being added search for environmental variables, my personal init.tcl file replaces the above code with. # Add plugin directory path(s) for user binary plugins. # Set paths based on the version of Nuke being launched. switch [set nuke_version] { "4.6000" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.6"} "4.7100" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.7v1"} "4.7200" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.7v2"} "4.7300" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.7v3"} } It grabs the environmental variable $HOME and then uses that as part of the path. Example 2: This last example is my init.tcl file, it will append my NFXPlugins directories to the plugin_path as well as add 2 other directories one which contains gizmos and the other tcl scripts. # Add plugin directory path(s) for user binary plugins. # Set paths based on the version of Nuke being launched. switch [set nuke_version] { "4.6000" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.6"} "4.7100" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.7v1"} "4.7200" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.7v2"} "4.7300" {plugin_appendpath "[set env(HOME)]/.nuke/plugins/NFX/4.7v3"} } # Add test plugin directory path(s) for binary plugins. plugin_appendpath "[set env(HOME)]/.nuke/plugins/test" # Add gizmo directory path(s) for user gizmos. plugin_appendpath "[set env(HOME)]/.nuke/gizmos" # Add tcl directory path(s) for user tcl scripts. plugin_appendpath "[set env(HOME)]/.nuke/tcl" |
