From the course: Maya: Natural Environments

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Introducing SeExpr syntax

Introducing SeExpr syntax - Maya Tutorial

From the course: Maya: Natural Environments

Start my 1-month free trial

Introducing SeExpr syntax

- [Instructor] Now let's explore writing an expression to drive an XGen attribute. First we'll need to look at the syntax of the Se expression scripting language. In the X gen editor, in the Primitives tab, in the Primitive Attributes section, let's go to the length attribute and click to launch the expression editor. We can make this code larger by holding down Control and turning the mouse wheel. In this very simple example, we're generating a random value and we see three lines of code. Each line starts with a dollar sign indicating a variable. The first two lines are declaring new variables, dollar sign A and dollar sign B, and we know it's a variable declaration because there's an equal sign. We're setting those variables equal to something. The third line multiplies those two variables to produce an output. Se expression is designed with the implicit assumption that the script is always going to output something.…

Contents