SF - Menu

The menu contains four main entries that will help make scripting tasks easier and provide access to often-used functions or settings. Although some of the functions share the same names as their counterparts in RealFlow's main interface, they work completely differently and cannot be executed with the commonly known shortcuts, e.g. the “Save” command.

 

IMAGE

File

This menu provides everything you need for organizing your scripts in terms of opening and saving. RealFlow scripts wear the extension RFS ("RealFlow Script") or PY ("Python"), RealFlow "Graphs" have a RFG ("RealFlow Graph") or XML extension.

 

IMAGE

Open...

You can easily load and open scripts with the file picker. When RealFlow opens a script or "Graph", it does not check if the content is plausible, because that is up to you. As long as the file content is readable for RealFlow, it can be loaded in the editor.

Save As...

Especially with scripts it is often required to store intermediate versions or tests. It is also a good idea to make backup copies of your scripts/"Graphs". The usage should be familiar: just assign a new name to each version and store it with “Save As...”.

Scripting Preferences… (only available for scripts)

With this entry you can directly go to the appropriate section of RealFlow’s "Preferences" and adjust things like colours or fonts. There is a detailed description of the various functions with RealFlow's programming editors.

Graphs Preferences… (only available for "Graphs")

With this entry you can directly go to the appropriate section of RealFlow’s "Preferences".

Edit

“Edit” provides everything you need for a fast workflow while writing scripts. Nevertheless you should be a little careful when pasting scripts from other sources, because of indents and leading spaces. You can also see powerful functions for finding and replacing words or phrases here.

 

 

Undo/Redo

Both actions exactly work as usual.

Cut/Copy/Paste

These three commands are available with all programs and operating systems, and should not need further explanation.

Delete

To use this function it is necessary to mark a section of a script first. Once you have selected the appropriate paragraph, you can remove it with “Delete”.

Select All

If you want to mark the entire script without exception, then please use this function.

Find...

This is actually a “find-and-replace” function. Calling “Find...” opens a new window with several options to search for certain word or phrases and you can replace them with a single click, as you can see from the image below:

 

 

Find next

You can look for the next appearance of a word without having to open and use the “Find...” option again.

Replace

A marked section in your script can be replaced with a certain phrase or word, located under “Replace with” from the “Find...” window.

Shift Right Text/Shift Left Text

Indents and leading spaces are very important concepts in Python. The first option works similar to the Tab key on your keyboard, the second one removes a tab.

Script (only available for scripts)

This menu gives you some basic tools to check and execute the currently loaded script, and is especially useful for debugging.

 

IMAGE

 

Clear

This function works similar to “New” from the "File" menu, but without asking you whether you want to store the script. You cannot undo this action.

Show Suggestions

To show commands that could match the currently entered phrase, choose this option. Normally, this is done automatically, but if you have turned off the auto completion function, you can still call it manually from here.

Check Syntax

This is a very important feature for debugging. Before the script is executed you can check if there are any errors or undefined variables. Especially copied/pasted scripts from other sources should go through a syntax check.

Check Integrity

With this command it is possible to check whether a script tries to execute simulation commands inside the "Steps" or "Frames" branches of the events tree.

An example: You have written a Python script and added it to the "FramesPre" section. At the end of the script there is a scene.simulate() command. A situation like that is an integrity violation and when you perform this check, RealFlow will complain and display a warning message.

Graphs (only available for "Graphs")

This menu consists of only one entry:

 

IMAGE

 

Clear

With this function it is possible to remove all nodes from the canvas. Please bear in mind that RealFlow does not ask for confirmation when you execute this command.

Help

RealFlow also offers an comprehensive help system for Python scripting, offering a complete reference for all commands, as well as individual help for single keywords.

 

IMAGE

 

Show RealFlow Scripting Reference… (only available for scripts)

This function calls RealFlow’s "Help Viewer" and directly branches to the built-in Python reference, where you can find out more about all commands available.

Show RealFlow Graph Reference… (only available for "Graphs")

This function calls RealFlow’s "Help Viewer" and directly branches to the built-in "Graph" reference, where you can find out more about all commands available.

Show Selected Keyword Info

To make use of this convenient function it is not necessary to mark an entire word, because RealFlow automatically detects start and stop. So you only have to place the cursor somewhere “inside” a command and choose this feature to display the available information.