diff --git a/demos/anim.script b/demos/anim.script index c47bd1d981b1cb976851b30aa652e5153fbff6c9..05b3040a0deb535699d55faaa93dfe1c6116a66f 100644 --- a/demos/anim.script +++ b/demos/anim.script @@ -5,10 +5,10 @@ all = GetValue("Animate one view at a time or all views together? 0: one at a time, 1: all together", 1) ; oldw = General.GraphicsWidth; -General.GraphicsWidth = GetValue("Width of animation?", 640); +neww = GetValue("Width of animation? (enter 0 to keep current width)", 640); oldh = General.GraphicsHeight; -General.GraphicsHeight = GetValue("Height of animation?", 640) ; +newh = GetValue("Height of animation? (enter 0 to keep current height)", 640) ; method = GetValue("Animation method? @@ -17,14 +17,27 @@ MPEG_ENCODE = 0; MENCODER = 1; WHIRLGIF = 2; +If(neww) + General.GraphicsWidth = neww; +EndIf +If(newh) + General.GraphicsHeight = newh; +EndIf + Print.JpegQuality = 100; If(all) + maxstep = 1; For i In {1:PostProcessing.NbViews} View[i-1].TimeStep = 0; + // compute max num of steps + If(View[i-1].Visible) + If(View[i-1].NbTimeStep > maxstep) + maxstep = View[i-1].NbTimeStep; + EndIf + EndIf EndFor - // Use the first view as the reference - For index In {1:View[0].NbTimeStep} + For index In {1:maxstep} Draw; If(method == WHIRLGIF) Print Sprintf("/tmp/tmp%03g.gif", index);