Stop simulation via python

Post Reply
timao
Posts: 11
Joined: Fri Jun 25, 2010 12:42 pm
Location: Hannover - Germany

Stop simulation via python

Post by timao » Tue Jan 18, 2011 1:25 pm

Hello,

is it possible to stop a simulation via python? I can only see the code for:

Code: Select all

scene.simulate(startFrame, endFrame)
I would like to wirte something like:

Code: Select all

if something:
    scene.simulate(stop)
Cheers

User avatar
Alex
Site Admin
Posts: 143
Joined: Mon Jun 14, 2010 9:35 am

Re: Stop simulation via python

Post by Alex » Tue Jan 18, 2011 1:36 pm

Hi Timo,

we understand the importance of such a stop simulation function. At this moment it does not exist, although we have plans for implementing it.

The simplest (and dirtiest) way of stopping a simulation is calling:

Code: Select all

scene.setCurrentFrame( scene.getMaxFrames() )
That way the simulation stops on the next frame change.
Alex Ribao
RealFlow Team
Next Limit Technologies

Post Reply