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.
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
- In the
Expression Editor, click
.
An Expressions list appears in the Expression Editor. This list shows all expressions created for the scene.
- 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.
Note: For 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
- Select the object or node in the Outliner, Hypergraph, or workspace.
- In the
Expression Editor ( ), click
.
This is the default search setting for the Expression Editor.
- Select
The selected object’s name and appropriate attributes appear in the window.
.
- 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 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.
. TheYou 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 About particle expressions for details.
Note: The Attributes list shows only unlocked, keyable attributes. You can select whether an attribute is keyable or locked with Channel Control Editor ( ).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
- In the Expression Editor, click .
- From the Object Filter menu, select the type of object or item the expression affects.
- Select .
- Select the affected object or item from the Objects list.
- 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
- Click .
- Select
You don’t select rotateZ attribute is an attribute of a light’s transform node, not of the light object itself.
in this example. The
.
- Select .
- Select the object Searchlight from the Objects list.
- Click
rotateZ from the
Attributes list.
The expression appears in the expression text field.