yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #26261
Re: [Question #698754]: Making video of pfacet clump: clump falling apart
Question #698754 on Yade changed:
https://answers.launchpad.net/yade/+question/698754
Status: Open => Answered
Bruno Chareyre proposed the following answer:
Hi, this ugly hack works for me. Depending on the latency of the OS you may have to adjust the sleep() times.
I'm considering adding a function to redraw, since here I'm just indirectly calling redraw by pausing.
This is not really using makeVideo but you can merge the files into one
video indepently, or find inspiration in the makeVideo code.
I hope it helps.
Bruno
snapN=0
def snap():
global snapN
O.pause()
time.sleep(1)
yade.qt.views()[0].saveSnapshot("snap"+str(snapN)+".png")
time.sleep(1)
snapN+=1
if snapN<5: O.run()
O.engines = O.engines+[PyRunner(command="snap()", iterPeriod=100)]
--
You received this question notification because your team yade-users is
an answer contact for Yade.