Expressions and Other Animation
Here are some ways in which you can use expressions with other types of animation on the same object or parameter.
Combining Expressions and Constraints
Expressions are evaluated before constraints on the same object. If you use the value of a constrained parameter in an expression, you may not get the desired results.
For example, suppose you want to write an expression to control an object’s orientation based on its position; if the object has a path constraint, the orientation is evaluated before the position is updated at each frame so the expression uses stale values. To achieve the desired result, constrain an intermediate object like a null to the path then constrain the object’s position to the null. When calculating the new orientation, use the null’s position.
It is possible to create dependency loops with constraints, expressions, and scripted operators. As a result, a warning appears in a message box if you apply an expression that introduces a cycle. See for more information.
Combining Expressions and Fcurves
While you can’t have both fcurves and expressions on the same parameter at the same time, there are some workarounds to doing this.
• If you want to globally clamp an object, you can place an expression on the global transformation parameter, say on the Y Position, and continue happily animating with local fcurves on the object.
• You can have fcurves on top of an expression using animation layers. Seefor more information.
• You can have an expression “on top” of an fcurve using clips on the mixer. For example, you can write an expression that clamps the Local Y Position and place it in an action which you drop in the mixer. You can then continue to animate on that channel of animation with fcurves and the mixer will temper the value with the expression within the clip.
Because you can activate or deactivate an expression (see ), you can have an expression with other animation on the same parameter, but it can’t drive the animation at the same time as other animation.
Converting Expressions to Function Curves
You can convert an expression to a raw function curve file (.fraw2 format). Softimage plots the value of the expression and saves a function curve file with a key at every frame. You can then open the saved .fraw2 file in the animation editor. The original expression applied on the selected parameter is left unchanged.
To convert an expression to a function curve file
1. Make sure that you have applied the expression. Softimage plots an expression only if it has been applied; it does not plot the contents of the expression editing pane.
2. In the expression editor, choose File > Save as Fcurve.
3. In the browser that opens, select a directory and file name, then click OK.
For information about opening function curves in the animation editor, see.
Autodesk Softimage 2011 Subscription Advantage Pack