Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This part translates the entered values into variables that can be used to create the emitter and adjust its physical properties. To trigger this process, the script has to check first whether the entered values have been accepted or not. That is necessary, because each window shows an “OK” and a “Cancel” button. By confirming with “OK”, you tell RealFlow that the values have been accepted and should be used to feed the script. This query is done with the show() function:

Code Block
themeEclipse
languagepython
int show()

...

The statement returns an integer specifying the button you have pressed. 1 stands for “OK” and 2 indicates that the operation has been aborted with “Cancel” or the ESC key. The query itself is packed into an if-condition to start with the translation of the values. Similar to the “get” instruction with parameters, where you can read out values from nodes, GUI functions also offer the get statement:

...

The GUI so far with the defined fields.