Find an animation expression you created previously
 
 
 

After you’ve created an expression, you might decide later to alter it to create a different animation result. To edit an expression, you display it in the Expression Editor. The following sections describe how to find and display an expression for editing.

NoteYou can find and edit MEL script nodes in the Expression Editor.

Find an expression by name

To find an expression, you can select from a list of all expressions in the scene.

To search for an expression by name

  1. From the Expression Editor, select Filter > By Expression Name.

    An Expressions list appears in the Expression Editor. This list shows all expressions created for the scene.

  2. Click the expression in the list.

    The expression contents appear in the expression text field.

    If you don’t remember the name of the expression, click each name on the list until the desired expression appears in the expression text field.

    NoteFor a particle shape node, you can create a creation expression, a runtime expression before dynamics execution, a runtime expression after dynamics execution, or all three. All expressions are listed under a single name—the name of the particle shape node. You can’t name or rename such expressions.

    To find such expressions, look for the particle shape node’s name in the Expressions list.

    Click the appropriate Runtime before/after dynamics or Creation checkbox to display the desired expression.

Find an expression by selected object

If you can’t remember the name you gave an expression, you can find it by selecting the affected object. For a non-particle shape node, you can also select an affected attribute from the Attributes list to narrow the search for the expression.

To search for an expression by object and attribute name

  1. Select the object or node in the Outliner, Hypergraph, or workspace.
  2. In the Expression Editor ( Window > Animation Editors > Expression Editor), select Filter > By Object/Attribute Name.

    This is the default search setting for the Expression Editor.

  3. Select Object Filter > Selected Objects.

    The selected object’s name and appropriate attributes appear in the window.

  4. For an object other than a particle shape node, click the name of the attribute controlled by the expression.

    If you’ve forgotten the name of the attribute controlled by the expression, select Attribute Filter > Connected to Expressions. The Attributes list displays only the attributes controlled by expressions for the selected object. Click each attribute in the Attributes list until you see the desired expression in the expression text field.

    You can’t write a different expression for each attribute of a particle shape as you can for other types of objects. Because you can write only one creation expression and two runtime expressions (before and after dynamics calculations) per particle shape, you don’t need to select an attribute from the Expression Editor’s Attributes list. See Particle expressions for details on particle expressions.

    NoteThe Attributes list shows only unlocked, keyable attributes. You can select whether an attribute is keyable or locked with Window > General Editors > Channel Control.

    To write an expression for any nonkeyable attribute not shown in the list, enter object.attribute name in the Selected Obj & Attr text box.

Find an expression by item type

You can find an expression based on the type of object or item the expression affects. For example, if you can’t remember an expression’s name but remember you applied it to a shader node, you can narrow your search to expressions that control shader nodes in the scene.

To search for an expression by item type

  1. In the Expression Editor, select Filter > By Object/Attribute Name.
  2. From the Object Filter menu, select the type of object or item the expression affects.
  3. Select Attribute Filter > Connected to Expressions.
  4. Select the affected object or item from the Objects list.
  5. Select the affected attribute from the Attributes list.

    The expression that controls the attribute appears in the expression text field.

Example

Suppose you’ve written an expression that controls the rotateZ attribute of a spotlight transform node named Searchlight. Do this.

To find the expression

  1. Select Filter > By Object/Attribute name.
  2. Select Object Filter > Transforms.

    You don’t select Object Filter > Lights in this example. The rotateZ attribute is an attribute of a light’s transform node, not of the light object itself.

  3. Select Attribute Filter > Connected to Expressions.
  4. Select the object Searchlight from the Objects list.
  5. Click rotateZ from the Attributes list.

    The expression appears in the expression text field.