Use expressions to generate values for primitive attributes and XGen modifiers. For example, you can create an expression that randomizes values for primitive length or adds noise to Clumping modifier values.
Expressions can be used locally to modify single attribute values and they can be used globally to apply to all Descriptions in a Collection ( see
Create XGen global expressions). Attributes that are controllable using an expression are identified by this icon:
.
Use expressions to control primitives by:
XGen updates the Description preview and closes the XGen Expression Editor.
You can load a saved expression or a pre-authored sample XGen expression that comes with Maya.
To load an expression from the XGen Expression Editor
The Library tab lists user-defined expressions saved to your xgen/library directory. The Samples tab lists pre-authored sample XGen expressions that come with Maya.
The expression loads in the edit area of the XGen Expression Editor.
If the Description does not update, ensure that Update Description Automatically is on.
To load an expression from the XGen Editor
After you create or modify an expression, you can save it as an SeExpr (.se) expression file. By default, expressions are saved to the Library tab of the XGen Expression Editor, which is sourced from one of the following directories:
You can load these expressions for use at another time.
To save an expression from the XGen Expression Editor
To save an expression from the XGen Editor