Expression Editor

Navigate to Window > Animation Editors > Expression Editor.

Configuration

Tip: On Windows, you can change the font size of the text in the Expression Editor.
  • Select the Expression text area, then hold the key and scroll with your middle-mouse wheel.

The text gets larger or smaller as you scroll.

Menus

Select Filter

The items in this menu control how you select expressions to edit. You can list all the expressions in the scene by name, objects and their attributes, or all the script nodes in the scene.

Object Filter

When the Select Filter menu is set to By Object/Attribute Name, this menu controls which object types appear in the object list under Selection.

Attribute Filter

When the Select Filter menu is set to By Object/Attribute Name, you can choose to show all attributes or only attributes that are driven by expressions.

Insert Functions

The items in this menu let you insert the names of useful MEL functions into the expression edit box.

Creating Expression

To create a new expression, type a name for the expression in the Expression Name box and click New Expression.

Selection lists

The Expression Editor displays a Selection list by default. This list displays either a list of objects and attributes, or a list of expressions you’ve created.

To display the list of objects and attributes, choose Select Filter > By Object/Attribute Name. This is the default display.

To display the list of expressions you’ve created in the scene, choose Select Filter > By Expression Name.

For a particle shape node, you don’t need to select an attribute from the Attributes list. You can create only one creation expression and two runtime expressions (before and after dynamics calculations) per particle shape node. The same expression appears for each attribute.

When you create a new expression, you can click an object from this list to select the default object to which the expression applies.

When you select the default object in the Expression Editor, you can skip omit the object name and period that’s part of a full attribute name.

Expressions list

The Expressions list shows all expressions you’ve created in the scene. When searching for an expression to edit, click an expression from this list to display and edit its contents.

Hide the Selection list

You can hide the Selection list to lessen clutter in the window. To do so, click the triangle next to Selection (see previous figure).

Filter attributes from the Selection list

If a selected object has several attributes controlled by expressions but you’re not sure which attributes, you can select a filter to list only attributes controlled by an expression.

To filter attributes from the Attributes list

  1. Select the object containing the attributes.
  2. Select Filter > By Object/Attribute Name.
  3. Select Object Filter > Selected Objects.
  4. Select Attribute Filter > Connected to Expressions.

    Only the object’s attributes controlled by expressions appear in the Attributes list.

    To see all attributes you can control with an expression again, select Attribute Filter > All.