Python SDK

Script: Set a project folder for RealFlow 2013!

Hi all!

Sometimes is necessary to write out the info in a specific folder we want and we have to do it manually  from the Export Central. It is not necessary anymore. SetProject script will replace the project folder indicating where we want to write out the information when simulating. Take a look this video

Download the script from RealFlow resources

NOTE: Maxwell folder is now working too.

luisM.

Tips and Tricks: Importing animated meshes to use them as RealWave.

Hi all!

When we have the facility to create a sea mesh in our 3d platform, which has the aspect we want because we applied modifiers to create turbulence, for instance, or any kind of effect for it, we found we can’t load the meshes in RealFlow to use them as a RealWave because the realwave only admit one object as Custom object. Well, I made an example to know how to load any animated meshes and use it as realwave.

– In order to do that we need to create the animated mesh in the 3d platform we want.

– We’ll export the animated mesh to obj sequence. There are several script to export sequences. For 3dsmax you can find some of them in http://www.scriptspot.com/. Remember you’ll need to export the obj as triangulated so RealFlow can read them without problems.

– Once the animated mesh has been exported, open realflow and import the obj sequence. If you have a lot of obj files, there will a lot of objects in RealFlow as well. You can download the obj sequence importer from here . Just paste the path where the obj sequence.

– Apply this script in Simulation Events for FramesPre. There is a bug in Realwave which if you reset the scene and the custom obj parameter doesn’t have any object, RealFlow will freeze. In order to avoid that, put in the maste scrtip in the Simulations Events

def onSimulationBegin():
node = scene.getRealwave()
node.setParameter("Custom obj", "rw_00001")

I add the scene and the script in the same zip to take a look. Remember if you put another name for your mesh, you must change it in the Simulation Events. It is advisable to leave the padding or change it as well.

Download the scene from here

luisM.

Realflow and PyQt4

Scripting with Python opens a lot of possibilities in RealFlow but if we include PyQt4 module we are increasing the functionality to create scripting with interface in Python and QT. In order to load the PyQt4 inside of Realflow we need to download Python 2.6 (32bits) and PyQt-Py2.6-gpl-4.5.4-1_amd64.exe (it is 64 bits because of Realflow needs the 64bits of QT). Next, we need to add a couple of variables at environment system variables:

PATH C:\Python26\Lib\site-packages\PyQt4;C:\Python26\Lib\site-packages\PyQt4\bin
PYTHON C:\Python26

It works in Windows vista and win7. In windows xp it could have some problem because of Realflow doesn’t find the module PyQt even if the variables are defined. Here we have some example with RF and PyQt.

Download example scene

Scripts Utilities

Hi all!,

Scripting by Python is a good way to increase the RealFlow possiblities. In this case, I made several scripts to help with the RealFlow’s workflow and they are:

– Import multiples Multibody at the same time.
– Import multiples XML at the same time.
– Rename object’s names.
– Align multiples objects.
– Save selection names.
– Isolated utility.

All scripts can be downloaded from Realflow Scripts.