Thread: Setup custom plugin & gizmo paths

Reply to Thread
Results 1 to 1 of 1
  1. #1 Setup custom plugin & gizmo paths 
    Join Date
    Apr 2007
    Location
    Los Angeles
    Posts
    782
    About:

    This tutorial will describe how to create a init.tcl file which will add user specified directories which Nuke will use for plugin or tcl source directories.

    If your like me and use multiple versions of Nuke then you may use separate directories for storing tcl scripts, gizmos, and plugins for different versions of Nuke. This tutorial will describe how to store them all in your "/Documents and Settings/$USER/.nuke" or "/home/$user/.nuke" directory and have Nuke only read those specified for a specific version.

    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.
    Code:
    # 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.
    Code:
    # 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.
    Code:
    # 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"
    Last edited by nathan; August 27th, 2007 at 03:15 AM.
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. ZbornToy - the after effects plugin
    By metalrahul in forum The Pad
    Replies: 3
    Last Post: July 24th, 2010, 05:25 PM
  2. Monitor Calibration Setup??!!
    By Spettekagan in forum The Pad
    Replies: 10
    Last Post: May 20th, 2009, 02:21 PM
  3. Help! Cinema 4D R10 exchance plugin
    By alibaba22 in forum Adobe After Effects
    Replies: 3
    Last Post: March 8th, 2007, 01:49 AM
  4. New plugin available
    By DavidW in forum Programming & Development
    Replies: 6
    Last Post: October 3rd, 2006, 03:18 PM
  5. HELP (Demo version of Afterburn Plugin)
    By revolutionary_edge in forum Beginners Talk
    Replies: 2
    Last Post: August 22nd, 2006, 09:31 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts