Replace referenced containers
 
 
 

You can replace referenced containers in your scene with new containers without losing any of your reference edits. This is possible because Maya stores reference edits of containers through their published attributes. It is useful because it allows you to change node names or even a container’s entire contents in a referenced scene without breaking edits applied in a parent scene.

To setup a container to be referenced

  1. Create a container encapsulating the nodes you want to reference.
  2. Publish the appropriate attributes to the container.

    Make sure to publish any attributes that are needed by the parent scene.

  3. Save the scene.

It is very important to publish the attributes that are used by the parent scene (the scene that will reference this file). Interacting with published attributes ensures that you can replace the container in your parent scene with a matching container without affecting the scene.

You can lock different aspects of the file to ensure that only published attributes are edited in the parent scene. For more information, see Lock referenced containers.

To reference the file into your scene

  1. Open the scene to be the parent scene.
  2. Select File > Create Reference.
  3. Select the file created previously.

    The contents of the referenced file appear in the scene.

You can now modify this referenced container in your scene with its published attributes. Once you have settled on reference edits (for example, an animation), you can replace the referenced container with a new container while still maintaining your animation.

To replace a referenced container in your scene

  1. Select File > Reference Editor.

    The Reference Editor window appears.

  2. Select the referenced file in the Reference Editor.
  3. Select Reference > Replace Reference.

    A file browser appears.

  4. Select a file to replace the reference with.

    The referenced container is replaced in the scene with the contents of the new file.

As long as the new file has a container with the same name as the old container and a set of identically named published attributes, the new container retains all the reference edits (in this case animation) you made to the old container.

Replacing references also works with published anchors. For example, if you have a prop file that needs to be parented to a character’s hand in a parent file, you can publish the prop as a child anchor in its own file and then parent a reference to the hand. You can then create multiple versions of the prop, all with unique geometry and names and publish a child anchor of the same name on all of them. You can then use the above replace method to swap the various props in and out of the character’s hand. For another example, see Example: Swapping arms on a robot.