RealFlow’s interface provides several tools for opening files from your local or network hard disks, and also allows you to select various nodes from a list. These tools can also be used for your own GUI windows. You have full access to these pickers and they offer full functionality, like filtering certain file or node types. There is a fixed code structure for opening the file picker dialogue:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
files = GUIFilePickerDialog.new() path = files.show(FILE_PICKER_LOAD, "PATH", "*.tif;*.tga", "Load Maps") |
The files.show()
statement contains a series of arguments. The first statement, FILE_PICKER_LOAD
, opens the file loader. If you want to save files, replace it with FILE_PICKER_SAVE
. The next part specifies the path of directory that will be opened. This path has to be adjusted to your own needs, of course. With the next argument it is possible to restrict the file list to a certain type. In this case only TIFFs and TGAs are displayed. If you want to show all files, use the *.* notation. Finally you can apply a name to your window. It is just entered between quotation marks, like any other string.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
dialog = GUINodesPickerDialog.new() nodes = dialog.show( TYPE_EMITTER | TYPE_DAEMON ) for single_node in nodes: scene.message(single_node.getName()) |
...
With TYPE_NODE
it is possible to restrict the displayed nodes to a certain type:
TYPE_CAMERA
TYPE_DAEMON
TYPE_OBJECT
TYPE_PB_EMITTER
TYPE_EMITTER
TYPE_STANDARD_MESH (or: TYPE_MESH)
TYPE_MESH
TYPE_JOINT
TYPE_GROUP
TYPE_REALWAVE
TYPE_MIST
TYPE_IDOC
TYPE_GRID_MESH
TYPE_GRID_DOMAIN
TYPE_RENDERKIT_MESH
TYPE_GB_EMITTER
TYPE_MULTIBODY
...
ALL_TYPES
The individual types are separated with a pipe character, which can be added by pressing AltGr + > (Windows/Linux) and Alt + 7 (OS X).