From: Axel Kohlmeyer (
Date: Wed Mar 10 2010 - 17:23:04 CST

On Wed, Mar 10, 2010 at 5:41 PM, nicholas lee <> wrote:
> Hello,
> I would like to use scripts to record snap shots of a system as it evolves and rotates. I am having problems however with the "animate next" command. It works fine when I execute it manually at the Tkconsole command prompt, but it does not have the same effect when placed in a for-loop as shown below.
> for {set i 0} {$i < 30} {incr i 1} {
> set filename snap.[format "%04d" $frame].rgb
> render snapshot $filename
> incr frame
> rotate x by 1
> animate next

please try inserting a "display update" here.

for efficiency reasons, tcl loops don't automatically
call the event handler for the GUI and thus the OpenGL
window will not get updated.


> }
> When I run the script above, "animate next" only advances the system once (as if it were outside of the loop), as opposed to 30 times (in accordance with the loop variable, i).
> How could I resolve this? Thanks in advance,
> Nicholas Jabari Lee

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.