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:
Swatch
- 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:
- Curve lets you use a value ramp in an expression to modulate values or components of an expression. The ramp is similar to other value ramps used in Maya.
- Color Curve lets you uses a color ramp to generate values through color variation. Use this ramp to assign colors based on values derived from an input.
- Int, Float, and Vector create slider controls for default values and user-defined minimum and maximum value ranges.
- Color creates a color swatch for color selection.
Edit area
The XGen Expression Editor provides the syntax features described below:
- Syntax highlighting that uses the following color conventions:
Expression component Text color Example Local variables and numeric values White Global variables Green Functions Cyan Parameter definitions and comments Red File paths and strings Yellow Constants Orange - Text auto-completion for functions, variables, and constants. As you type in the edit area, a prompt displays a list of possible elements along with descriptions.
For functions, place the cursor in the parenthesis to display information about accepted arguments.
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.