Developer Documentation
|
OpenFlipper can be started in batch mode without a graphical user interface by providing "-b" as a command line option. Furthermore you have to provide an OpenFlipper script (extension is .ofs), which will get executed. To get output to the command line, you also have to provide the command line switch "-c". Only plugins which support batch mode ( They implement an nogui() function ), will be loaded. For example, no renderers, postprocessors or other plugins providing only user interface or graphical functionality will be loaded. You can see on the command line (when "-c" is given), which plugins are activated and which are skipped in batch mode.
In the scripting system you can also iterate over objects in the scene.
In the scripting system the type DataType is already known. You can do for example
You can get a string list with all available data types via
Openflipper provides functions gathering the id of an object. Also, some functions create an object and return its id. Some examples:
The Vec3d used in the C++ code is mapped to the scripting language. Details can be found here: Vector data type for scripting
The Vector4d data type is corresponding to the Vec4d type in C++. It is mostly used for colors. Details can be found here: Vector4d data type for scripting
The Matrix4x4T type used in the C++ code is mapped to the scripting language. Details can be found here: Matrix data type used for scripting
Some functions can perform the same operation on several objects or give multiple objects back. The Id's of these objects are saved in a IdList. This is a simple list of integer containing the id's. Example code:
The QVariantMap type is used by some function as input. A QVariantMap is similar to a map with key and value, where the types of the key and value is not defined. Mostly, the keys are strings describing the property where the value type is of type int. Example code:
Yes, just use the keyword include. You can also use paths relative to the current script. The scripts will be joined internally so variables are available across the scripts.