Script Types

Scripts can handle different tasks and therefore it is necessary to distinguish a few types. Within RealFlow there are three fundamental types:

Batch Scripts

Batch scripts are perfect for all kinds of automated processes, e.g. if you want to run several scenes over night, automatically add and manipulate emitters, daemons, and objects, or run through all existing nodes and change names or export properties.

RealFlow provides a specific window reserved exclusively for batch type scripts:

Menu Bar > Layout > Batch Script (F10)

Batch scripts are not saved with the current project and you always have to store them separately on your hard disk. It is a good idea to either find a common place for all batch scripts.

 

Simulation Flow Scripts

"Simulation Flow" scripts are executed when a simulation starts or ends, or the beginning of a new time step or frame. Scripts are not limited to one of these events. You can write one part that is only executed at the beginning of the simulation and another one that is applied at each simulation step. These types of “split” scripts are often used to initialize a scene or reset values to defaults, and then perform the actual calculation. RealFlow provides a specific window reserved exclusively for this script type:

Menu Bar > Layout > Simulation Flow (Ctrl/Cmd + F2)

The execution of "Simulation Flow" scripts can be very time consuming, depending on the complexity of your script and the project. You might see a drop in simulation speed with scripts, mainly with events scripts, because Python is single-threaded.

Scripts can be added with a right-click on the appropriate entry of the events tree:

 

Node Scripts

Here, the most important type is the scripted daemon where you define custom forces and let them act on fluids or objects. An empty scripted daemon node can be found under:

Daemons shelf > Other > Scripted

The associated editor is located in the daemon's "Node Params" panel under "Edit".

RealWave nodes also provide the possibility of creating custom deformers. To open the appropriate editor go to

RealWave > right-click > Add Wave > Scripted