If you are working with an old project that contains expressions, they are converted to a JS program. Only simple expressions are updated. Complex expression and expressions using non-ported services cannot be converted. For these type of expressions, you must convert them manually.
The Expression editor is where you write expressions. It is a simple text editor that can handle incomplete or invalid JS programs although they will not be evaluated, Harmony can save and load invalid JS programs.
The Expression editor evaluates the current script at the current global frame and reports any error or returns the numerical result of the program.
This is a trivial program returning 10.
This is another trivial program returning the current frame. The variable “currentFrame” is one of the predefined variables and services available.
value( “MyBezierFunction”, currentFrame - 1 );
A simple expression program the returns the value of the Bezier function “MyBezierFunction” at the previous frame. If this function does not exist in the scene, the expression column will be blank in the XSheet. If this function does exist, the expression column will show the value of that function at the frame.
This is another not so trivial program that evaluates the fibonacci series starting at the current frame. The value will be computed up to a certain current frame. After that frame, the program is too complex and will be stopped by the engine before finishing.
Programs that take too long to execute, do not generate a numerical value, or has syntax errors will not be compiled and will not compute a value. The scripting editor will show the condition that triggers this, but the Xsheet will simply display a blank field.
Open topic with navigation