Using Yadle: Ways to Access Yadle: Foundry Nuke Plugin: File Action Menu


Customize the file action dropdown menu for the Yadle Nuke plug-in. Yadle enables users to find what they are looking for fast. This is further supported by enabling users to act on the files once found. Yadle provides the basic framework for users to implement default Nuke actions or create their own to help automate workflow. The How to Customize Menu section on this page explains all the different parameters for tailoring actions specific to your workflow.


How to Customize File Action Menu

The yadle_open_option.json file which lives under <path/to/yadle/folder>/Yadle_Nuke/yadle_nuke/yadle_scripts directory, contains all necessary parameters for customizing the file action menu. Each of the parameters are listed below in their appropriate hierarchy along with a description.

  • A. is_open_menu: To turn on/off file action menu. If set to true, file action menu will be displayed. If set to false, only default open button is displayed.
  • B. scripts: Contains list of menu items that are defined by the following parameters:
    • i. item: The displayed text of the menu item.
    • ii. plugin: Contains details for menu item defined by the following parameters. Can nest menu items up to 2 levels.
      • a. script: Contains script info defined by the following parameters:
        • i. name: The name of the script that will be called for particular menu item. If no path is specified, it will look for scripts in the same folder (Yadle_Nuke/yadle_nuke/yadle_scripts). If full path is specified, it will get the script from the full path. The name of the script needs to match the name of the function contained in the script.
        • ii. arguments: The arguments of the script. For python script, arguments are key-value map that are passed as **kwargs to the script. For mel scripts, arguments are passed as string array of keys and string array of values.e script.
      • b. Windows, Linux, Darwin: Configure menu items to only show for a certain operating system. The menu item will be visible/hidden based on the following options:
        • i. enable: If set to true, then it will look for excludes option. If set to false, then the menu item will be hidden.
        • ii. excludes: A list of file extensions to exclude.
          • If excludes is not specified, or if the excludes list is empty, or if current file’s extension is not in the excludes list, then it will look for includes option.
          • Otherwise, the menu item will be hidden.
        • iii. includes: A list of file extensions to include.
          • If includes is not specified, or if the includes list is empty, or if the current file’s extension is in the includes list, then the menu item will be visible.
          • Otherwise, the menu item will be hidden.

Use Local Configuration for File Action Menu

Individual users can define their own File Action Menu instead of using the global configuration. Here’s how:

Step 1: To customize menu on local system, copy the yadle_scripts directory from centralized location to yadle/nuke directory in home folder:

  • On Linux or MacOS, copy yadle_scripts from centralized location to ~/yadle/nuke/yadle_scripts
  • On Windows, copy yadle_scripts from centralized location to C:\Users\<username>\yadle\nuke\yadle_scripts
Note:
  • As long as there is a local …/yadle_scripts/yadle_open_option.json file, this file will be used to define File Action menu instead of the one in centralized location.