Plug-ins User Guide

Version 5.2 | Published March 20, 2024 ©

Expressions

An expression is a text parameter combining constant strings and references to DataPool variable’s (DataField’s) value. The reference syntax is $(DataField). When using the expression, the string $(DataField) is replaced by the value of the DataField specified in the parentheses. For example, suppose we need to run different animation directors in Viz and we want to send the name of the director as a parameter. The command in Viz to run a director is:

0 RENDERER*STAGE*DIRECTOR*<name> START

So we need to send the entire command for each director that we want to run. By using expressions, only the name of the director to be run is sent to Viz. We define a DataField called DIR that contains the name of the director to run.

Note: Predefined DataFields are defined in the config.dp file, residing in the Viz folder.

Now we can use the following syntax for running the animations:

0 RENDERER*STAGE*DIRECTOR*$(DIR) START

$(DIR) is replaced by the incoming data, so if the data was DIR=mydirector; the whole expression is interpreted to be:

0 RENDERER*STAGE*DIRECTOR*mydirector START

Note: The string enclosed between the parentheses is considered to be either a DataPool variable, a special DataPool command or a special DataPool variable.

A common DataPool variable is $(INDEX). This variable is used to access the full index range of a DataField. For example, if we have two DataFields called DST[10] and SRC[10] and we want to copy all the values from vector SRC to vector DST, the expression should state DST[$(INDEX)]=SRC[$(INDEX)]. A useful DataPool special command is $(REFRESH). The effect of having an expression like $(REFRESH) $(VALUE) is to trigger all the plug-ins registered to the DataField called VALUE without having to receive external data. Each data plug-in has its own set of special purpose variables. They are explained in the explanation of each plug-in.