Page 1 of 1

Stop simulation via python

Posted: Tue Jan 18, 2011 1:25 pm
by timao
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

Re: Stop simulation via python

Posted: Tue Jan 18, 2011 1:36 pm
by Alex
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.