Connect attributes with an expression
 
 
 

To connect the value of one attribute to another with an expression

  1. In the Attribute Editor, type an equals sign (=) followed by a MEL expression in the attribute’s text box.

    or

For example, to make the translateX value of pTorus1 always equal the translateY value of pCone2, type =pCone2.translateY in pTorus1’s translateX box. When you move the cone up and down in Y, the torus moves side-to-side in X.

You can create more complex expressions using multiple attributes and MEL’s math functions.

When you type an expression into a text box in the Attribute Editor or Channel Box and press , Maya then shows the computed value with an purple background. You can’t edit values that are the result of an expression. To edit the expression, use the Expression Editor.

Related topics