Container templates are XML files that let you create a common user interface for assets that are interchangeable. For each template, you can create multiple custom views of the published attributes. Each view can be customized with its own layout, attribute labels and descriptions (tooltips).
After you have created a container and defined its published attributes, you can save a template of the published attribute names. (See Create a container template.) The next time you create a container of the same kind, you can load the saved template to set up the new container with the same published names. (See Assign a template to a container.)
Templates are referenced by the container using the container’s Template Name attribute, which tells the container which template to use. (See also Template naming conventions.) Each template file stores a set of published attribute names that the assigned container requires. This lets you quickly and easily create other containers of the same kind without missing any of the required attributes. Saving templates as separate files lets you establish a library of templates that you can reuse across a pipeline, independent of specific scene files.
Once you have assigned a template to a container in your scene, you can bind the container’s attributes to the template’s unbound attributes.
For example, you can set up all of the spot lights in your scene using the same container template, giving all spot light containers a common interface. Since all of your spot light containers have the exact same set of published attributes, you can easily swap controls and animation between them using Replace Reference or Transfer Attribute Values. (See Replace referenced containers and Transfer attribute values between containers.)
Using templates to create a common interface for assets is optional. However, if you save templates, you can also define multiple views, or layouts, for each template. Template views let you completely customize the container interface, changing the grouping, organization, and naming of attributes in the Asset Editor, Attribute Editor, Outliner, and Channel Box.
The following illustration shows the Attribute Editor for a fountain asset first with no views assigned, then with two different views created for the shading artist and the environment artist on a team. Each artist is supplied with only those attributes they will need when working with the fountain asset.
Even if you do not save templates or define custom views, the container View Mode attribute gives you two options for organizing the layout of published attributes in Maya’s various windows and editors. The Group By Node view organizes published attributes by node, with one collapsible frame per node. The Flat view lists nodes in the order they were published.
For more detailed technical information about container templates, refer to Parts of a container template and Template file format.
Template views let you define the way a container’s published attributes are displayed in Maya’s windows and editors. Depending on your production requirements, you can create multiple views for each template. (See Add a view to a container template.)
A template view is essentially a set of published container attributes that you have grouped and organized together for a specific purpose. Creating a set of different views for one template lets you create a different user interface for any purpose your pipeline requires. (See Customize a template view.)
For example, you can create custom template views to do the following:
Re-organize the container display, changing the grouping and order of attributes.
You can specify the attributes you want each user to have access to by creating a template view for that user. For example, you might create a view for the modeler, one for the rigger, and one for the animator on your team.
You group the controls and attributes that each user needs into an interface designed specifically for them. Since each user can modify only the attributes you have included for them, there is no danger of team members accidentally overwriting attributes not related to their work.
Set up a view for each task that team members need to accomplish within a project. You can streamline the workflow for each user by including only the attributes they will require for an assigned task within a template view. Users can switch between different views as they complete work on the project and save time searching for the attributes they need.
For information on setting up your own customized views, see Add a view to a container template and Customize a template view.