Edit an asset template

 
 
 

You can modify an asset’s template file to change the asset interface. These changes can be seen in Maya when the asset View Mode is set to Use Template and the View Name is set to None.

The following image shows the Attribute Editor for an asset with a basic, default template assigned. The asset’s template has not yet been edited.

You can edit an asset template file in the XML editor of your choice. (Refer to Parts of an asset template and Template file format for detailed information about template files.) The following image shows the Attribute Editor for the same asset after some simple modifications to its template file.

To open a template file for editing

  1. Open a text or XML editor and navigate to select a previously saved template file. (See Create an asset template.)

    By default, the XML template files you create are saved in the assets sub-directory of your current project.

Note

Each time you edit a template file in an external editor, you must reload the template in Maya in order to see your changes. See Reload an asset template.

To rename published attribute names in the template

  1. Edit the name text string within an <attribute> element.
    Note

    The name for an <attribute> element cannot contain spaces, special characters, or multibyte characters. If you want the display name for an attribute to display with spaces or special characters, you can add <label> elements to contain those names.

To change the display names for an asset

  1. Edit the <label> element within an <attribute> definition.

    Unlike the attribute names, the <label> elements can contain spaces, special characters, and multibyte characters.

    Note

    Editing the <label> element also changes the tooltip text that displays over the attribute in the Asset Editor.

To reorder published attribute names

  1. Select and cut an entire <attribute> element.
  2. Paste the element to a new location.

    Ensure that you don’t paste the selected attribute element inside another attribute element, as this structure will not validate.

To remove published attribute names from the template

  1. Delete entire <attribute> elements.

To change the tooltips that display over published names in the Attribute Editor

  1. Edit the text within an attribute’s <description> element.
    Tip

    The text within <description> tags can be localized. See Localize the asset user interface.

Note

The Asset Editor also displays tooltips that are based on the attributes’s <type> and <label> elements.

Related topics

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License