Register elements with the File Path Editor

The File Path Editor only recognizes registered nodes and attributes. Reference, file, image plane, and audio nodes are registered by default. Any other node that has an attribute with the usedAsFilename flag can be registered. The usedAsFilename flag can be added with the addAttr command.

This requirement lets you control what is displayed in the File Path Editor, and allows for the support of custom node types from plug-ins and scripts.

To register an element with the File Path Editor

  1. In Maya, enter the MEL command filePathEditor -registerType "<nodetype>.<attribute>" -typeLabel "<labelname>"; into the Command Line or Script Editor.
    For example, to register an audio node with the label name Sound, enter the command filePathEditor -registerType "audio.filename" -typeLabel "Sound";
    Note: To register Scene Assembly paths, do one of the following:
    • To include representation files from the assembly definition node, use filePathEditor -registerType "assemblyDefinition";
    • To include definition files from the assembly reference node, use filePathEditor -registerType "assemblyReference";

    The element is saved automatically to the filePathEditorRegistryPrefs.mel file in your preferences folder. See Preferences.

    Once registered, the label is used in the following parts of the File Path Editor:
    • Options > List by File Type
    • Select > Select by Type
    • Show menu
    • Resolve list in the Auto Resolve window

To deregister an element with the File Path Editor

  1. In Maya, enter the MEL command filePathEditor -deregisterType "<nodetype>.<attribute>"; into the Command Line or Script Editor.

    For example, to deregister an audio node, enter the command filePathEditor -deregisterType "audio.filename";

    The element is automatically removed from the filePathEditorRegistryPref.mel file in your preferences folder and all parts of the File Path Editor.

Related topics