XGen Expression Editor

Use the XGen Expression Editor to create new expressions or apply saved XGen expressions to your Descriptions. To open the XGen Expression Editor, click the icon located beside attributes in the XGen Editor. You can open multiple instances of the editor.

The XGen Expression Editor has the following main areas:

XGen Expression Editor tabs

Click the Library to display user-saved expressions or Samples to display expressions that come with Maya. Select an expression from the list to add it to the expression edit area.

By default, the Library and Samples folders are located in the following location:

C:\Program Files\Autodesk\Maya2016.5\plug-ins\xgen\presets\expressions\
Tip: You can add tabs for organizing your expressions in the XGen Expression Editor by creating new subdirectories in the global, local, and user directories of your XGen configuration (see Specify locations for user, local, and global file repositories).

Swatch

The swatch provides feedback about your expression's execution by displaying:
  • Red when an expression fails to evaluate. Click the swatch to display the expression errors.
  • Visual representations of how the expression modifies values. For example, the swatch displays the pattern generated by noise expressions. Clicking the swatch updates the display. If your expression uses slider controls for input values, the display updates automatically when you change these values.

Value controls

XGen adds slider controls to the editor when you declare local variables in an expression.

Click Add Widget to add the following value controls to your expressions:

See Control primitives using expressions.

Edit area

Use the edit area to author, modify, and display all of the elements used in your expression.
Tip: To change the font size, select in the expression edit area, hold the Ctrl key while scrolling with your middle-mouse wheel.

The XGen Expression Editor provides the syntax features described below:

Execution and save

Apply and Accept

Checks the syntax, executes the expression, and updates the Description preview. Selecting Accept also closes the XGen Expression Editor after the expression executes.

Note: Update Description Automatically must be on for the Description to update when the expression executes.
Save and Save As
Saves the current expression to an SeExpr (.se) file. By default, Maya saves expressions to the <username>\Documents\xgen\expressions directory.

Expressions saved to this location can be selected from the User list of the editor's Library tab.

Related topics