Tips & Tricks with Expressions

 
 
 

This section provides some information about using expressions in specific situations.

Multiple Expressions on the Same Parameter

In Softimage, an expression is treated like any fcurve-based animation, meaning you can use the mixer to mix its weight. If you store your existing animation in an action clip, you can write your expression and store that in its own clip as well. Then you can mix the two clips and make sure your expression affects the parts of your animation you want it to.

You may want to have more than one expression driving the same target. The expression editor will not allow you to create an expression on a parameter if there is already another expression driving it.

The following steps provide a workaround using the animation mixer:

  1. Create your first expression on a target, then mark the parameter and choose Actions Store Marked Parameters - All Sources from the Animate toolbar.

  2. Now that you have an action of the expression (and have removed the original expression from the parameter), set the next expression directly on the parameter.

  3. In the Animation Mixer, load the action. You now have two expressions on the same parameter.

Using Color Parameters with Expressions or Linked Parameters

If you want to set expressions on or link parameters with the individual R, G, B, and A channels (red, green, blue, and alpha), you need to use the explorer instead of a property editor. This is because the RGBA sliders in a property editor consist of the four parameters combined, but they are not individually accessible from there.

   

On the left, typical color sliders in a property editor don't expose the color channels individually.

On the right, the same color parameters are exposed in the explorer. Now you can set expressions individually on any of them.

Using Custom Parameters as Variables

Local variables are not currently supported in expressions, but you can store values or animation in a custom parameter for the object you are driving and then reference that custom parameter within the expression. You must then change only the custom parameter to update all expressions that reference it.