Expression Constraints Settings pane

Expression constraints let you constrain the translation, rotation, scaling, and other data of an object (models, lights, cameras, and so on) with that of another object. Unlike other constraints, you construct Expression constraints using a spreadsheet-like interface called the Expression Constraints Settings pane.

When an Expression constraint is selected, the Expression's Constraint Settings pane is displayed in the Navigator window. The Expression Constraint Settings pane is where you use a mathematical method of constraining objects, unlike the Relations pane which offers a more graphical approach for constraining objects.

Expression constraint A. Sender Cells B. Receiver Cells C. Expression

The Expression Constraint Settings pane contains a total of 500 rows and 26 columns (A-Z).

To navigate in the Expression Constraints Settings pane:

To change the width of a column:

An Expression is comprised of at least three cells. One cell contains a reference to a Sender while the other two cells are split into a Receiver cell and a mathematical expression cell.

Types of cells

When constructing Expression constraints, a cell may contain one of the following:

Cell Type Purpose
Senders A Sender can be an input device or a model. Senders are used to send data to other cells. Senders only send data.
Expressions An Expression is a recognized keyword that performs a mathematical operation using the cells or numbers within its parentheses or on either side of its operator. For example, an addition symbol (+) is an operator. The result of the operation is assigned to the Receiver cell to the left and to the cell itself. This means that you can reference the cell in other expressions.
Values A cell may also contain a value referenced by an expression or Receiver. Before assigning a value to a cell, you should select the cell’s data type.
Receivers A Receiver cell assigns the results of an expression to the properties of a model or an output device.

The following conventions are used to describe each type of expression used in an Expression constraint:

Number

Refers to a numerical value or a cell that contains a numerical value.

Vector

Refers to a vector (X, Y, Z) or a cell that contains a vector value.

Boolean (or Bool)

Refers to a Boolean value (0 or 1) or a cell that contains a Boolean value.

An Expression constraint consists of at least three cells. One cell contains a reference to a Sender while the other two cells are split into a Receiver cell and a mathematical expression.

The cell sending the data can refer to an input device such as a mouse device, and the object receiving data can be a model, light, or an output device. For example, the figure below shows a mouse mapped to a marker in the Expressions pane.

Expression constraint A. Objects area B. Expression Constraint Settings pane

Between the Sender and Receiver, a mathematical expression is used to convert the numerical data from the X and Y mouse values to a vector.

You can use an unlimited amount of mathematical expressions between the Sender cell and the Receiver cell.