Functions
 
 
 

Flint includes many predefined functions that can be used to perform calculations in an expression. You pass function-specific values, called arguments, and they return another value back to the expression that called it. A function call in an expression begins with the function name, followed by an opening parenthesis, the arguments for the function separated by commas, and finally a closing parenthesis.

NoteFunction names are case-sensitive.

Arguments for functions can be either scalar values or vectors. When you use a function, make sure that you pass it the correct type of parameter. See Function Reference for information on the arguments and return values for each function.

You can nest function calls by using the return value of a function as one of the arguments of another function. When a nested function is used as an argument, it must return a value that conforms to the type and range that the argument requires.

You can define your own functions and use them in your expressions just as you would with any of the predefined functions. See Defining Your Own Functions.

Examples

The following expression uses the noise function to create a random positioning effect for axis1.

Channel Expression
axis1.position.x noise(frame)*5

The following expression uses the eval function to make the position of axis2 the same as that of axis1, but delayed by 10 frames.

Channel Expression
axis2.position eval(axis1.position, frame - 10)

The following expression uses the eval function to make the animation of axis3 the same as that of axis1, but at half the speed.

Channel Expression
axis3 eval(axis1, frame / 2)