Input Parameters
In many cases, scripts or graphs require start values to work. These defaults are then modified by the user to get different results. The input is done via a customizable user interface – something that has only been possible with scripts so far. In RealFlow 2014 you will now find appropriate nodes to allow user interfaces with graphs as well. These interface nodes have a direct connection to the “Add” window's “Input parameters” section. This means that you can edit the graph's default values here without opening and editing the graph itself.
Edit input parameters (n)
If your graph contains interface nodes you will be able to list, display, and edit them with a click on this button. The number in brackets shows the total number of input parameters.
Please take a look at the "Using the Input Parameters" subchapter below for an example how to work with this feature.
Edit default values
This dialogue is closely related to “Edit input parameters (n)”. There you can edit the interface nodes, but here is a place to define their initial values when the graph is executed and the UI is displayed.
Please take a look at the "Using the Input Parameters" subchapter below for an example how to work with this feature.
Edit next execution values
This is a very nice feature, because RealFlow can remember the user's input values and write them to the UI when the command is executed again. In other words: the working settings are kept and you do not have to repeat the entire input procedure when you are using the command the next time. Please bear in mind that this feature also works for C++ plugins.
Prompt user
When a command provides a user interface you can choose here when it should be displayed:
“Never”. The UI will not be shown and the default values are used for the command's execution
“On first execution”. With this option, the UI will be shown only once during a session.
“Always”. In this case, the UI will be shown when the command is executed.
Cancel/Add
With “Cancel”, the current process is aborted. “Add” confirms your settings and adds the command to the already existing pool.
Using the Input Parameters
In RealFlow 2014 you will find some new graph nodes allowing you to create user interfaces with input parameters. The parameters of such an interface will be pushed to the “Commands Manager”. There it is possible to change them without having to touch the graph itself. All changes made in the “Edit input parameters” dialogue will be added to the graph again.
Please download the "MessageGraph.rfg" here. It is used in the following descriptions: MessageGraph.rfg
Edit input parameters [n]
To become familiar with the input features mode of operation, a very simple graph is created. The purpose of this graph is just to print out a few values to the “Messages” window. Download the graph and follow these steps:
Commands Manager > Add > Add new graph from file
Edit graph
From the editor load the downloaded file with “Open...”
Confirm with “OK”
Now, click on the “Edit input parameters [3]” button. There you will see three entries. “Parameter Name” is simply the name of the input field, while “Parameter Type” is of greater importance: with custom user interfaces it is always necessary to determine which type of value RealFlow has to expect. Is it an integer, a vector, or a string, to name but a few. When you double-click on one of the types a drop-down menu appears showing all valid data types.
The order of the entries describes, in which order the parameters will be displayed when the graph is executed. To change this order, simply drag and drop an entry with the small button on the left. If you want to delete a parameter click on the trash bin icon.
Add Parameter
A click on the “Add Parameter” creates a new interface node in your graph – its name and type can be specified here in the edit dialogue directly. Please bear in mind that you have to edit the graph to connect the new interface with other nodes and evaluate it.
Find Graph Inputs...
A click on this button finds all nodes with “orphan” pins. Once RealFlow has detected such a pin you can check it in the appearing list and connect it with new interface nodes automatically. The new interface node's parameter will be shown in the parameter list where you can define a name and specify the parameter type.
OK/Cancel
Confirm your settings with “OK”, or abort the process with “Cancel”.
Edit default values
Currently, there are interfaces and nodes to print the values to the “Messages” window, but which values? Where are they and how are the default values defined at all? The answer is this button. When you click on it, the graph is analysed and all input parameters are listed in a separate window. There you can enter the values you want to use when the graph/command is executed for the first time.
The graphs default values. When the graph is execute for the first time, these values will be printed to the "Messages" window.
Copy to next execution values
When a command's user interface is executed several times RealFlow will put the values of the previous launch to the UI. This way you do not have to note or remember your last settings.
OK/Cancel
Confirm your settings with “OK”, or abort the process with “Cancel”.
Edit next execution values
As described under “Edit default values”, the next execution values are the ones you have used before. Sounds weird? An example:
At the graph's first launch you will see the default values:
String = Hello!
Integer = 5
Real = 3.14
Change the values, check "Copy to next execution values", and execute the graph:
String = Hello RealFlow users!
Integer = 5
Real = 2.5
The values are printed to the “Messages” window when you launch the graph again. This time you will not see the default values, but the ones you have entered before:
Copy to default values
As you can see from the example above, RealFlow remembers your settings and uses them as new, temporary defaults. For simulations this is of particular importance, because once you have found working settings you are satisfied with, check “Copy to default values” to add them to the graph permanently: when you open RealFlow the next time you will see these new settings instead of the original values.