Expressions overview

 
 
 

Most attributes in XGen can be controlled using expressions. An expression is a flexible way to specify how an attribute is evaluated based on a combination of function calls and arithmetic operations. Expressions can be simple constant floating point values or more complex including a number of mathematical operations. Attributes that you can control using an expression have an expression icon to right of its slider control.

Clicking this icon opens the XGen Expression Editor, which lets create new expressions and use sample expressions stored in the \xgen\presets\expressions folder of your Maya install directory.

XGen attributes can also be set using slider controls or PTEX maps (see Control primitives with PTEX maps). Clicking this icon opens a popup menu, which lets specify the method for setting the attribute. Expressions that specify the use and location of a map can be typed into the attribute.

XGen also lets you create global expressions, which apply to the current Collection. You can use the output of a global expression as a constant value for other attribute-based expressions. For example, you can create a global expression scale (), which can be called in other expressions as scale. The output of this expression can then be used as a constant value for other attributes. You can create global expressions from the Expressions tab.

Related topics

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License