Scripting is a perfect way of extending RealFlow's capabilities or develop your own customized solutions. For this purpose, RealFlow offers a Python interface which provides all necessary commands and functions to control most of the software's nodes, parameters and attributes. The description of such an interface is called Software Development Kit (SDK). There you can find all available commands together with explanations how to use them. RealFlow's Python-SDK is part of the internal "Help Viewer" and can be used directly within the application.
Info |
---|
“Python” and the Python logos are trademarks or registered trademarks of the Python Software Foundation, used by Next Limit Technologies with permission from the Foundation. |
Python has many advantages:
...
All these advantages are good reasons for an implementation of Python into RealFlow. Python is a full-featured scripting language with support for modern structures, such as object-oriented programming, also called OOP, or hashes for fast search algorithms. It is also possible to establish database connections to store and administrate large amounts of data. Other packages offer functions for numerical calculations, image generation, and OpenGL support. There are also many modules available for 3D graphics and visualization Next Limit introduced a Python interface giving the user the ability to overcome many of the restrictions known from earlier RealFlow versions. With RealFlow 2012 the entire Python distribution has been extended to support all the new features. An often-discussed issue is Python’s inability to use more than one processor, also called multi-threading. Please be aware that:
- Python is single-threaded by default, but RealFlow is not. Python’s limitation has a direct effect on RealFlow’s simulation speed when scripts are involved.
- Executing Python scripts is not completely single-threaded. Computers and operating systems always use more than one core or processor, though it is not possible to address them directly.
- Python provides some libraries for multi-threading support, but they only work on few platforms and in the worst case you have to recompile your Python distribution.
...
- Do I always need large lists or can I loop through my objects with a while statement?
- Is there a point where I can empty a list variable and free memory?
- Do I really need all global variables?
- Is there unnecessary code within my script?
- Are there ways to shorten or contract my code and statements?