Skip to content
Snippets Groups Projects
Commit 9871e9aa authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

polish
parent b7c54dc3
No related branches found
No related tags found
Loading
// This script creates an mpeg or gif animation by looping over all
// the time steps and/or all the post-processing views
all = GetValue("Animate one view at a time or all views together?
0: one at a time, 1: all together", 1) ;
oldw = General.GraphicsWidth;
neww = GetValue("Width of animation? (enter 0 to keep current width)", 640);
oldh = General.GraphicsHeight;
newh = GetValue("Height of animation? (enter 0 to keep current height)", 640) ;
all = GetValue("Animate one view at a time or all views together?
0: one at a time, 1: all together", 1) ;
method = GetValue("Animation encoder?
0: mpeg_encode (MPEG1), 1: mencoder (MPEG4), 2: whirlgif (GIF89)", 0) ;
......@@ -18,6 +13,9 @@ MPEG_ENCODE = 0;
MENCODER = 1;
WHIRLGIF = 2;
oldw = General.GraphicsWidth;
oldh = General.GraphicsHeight;
If(neww)
General.GraphicsWidth = neww;
EndIf
......@@ -25,8 +23,6 @@ If(newh)
General.GraphicsHeight = newh;
EndIf
Print.JpegQuality = 100;
If(all)
maxstep = 1;
For i In {1:PostProcessing.NbViews}
......@@ -78,7 +74,6 @@ If(!all)
EndFor
EndIf
NUM_FRAMES = index;
ENCODER = method;
Include "encode.script";
......
// This script creates an mpeg or gif animation by applying
// incremental rotations around the 3 coordinate axes
oldw = General.GraphicsWidth;
neww = GetValue("Width of animation? (enter 0 to keep current width)", 640);
oldh = General.GraphicsHeight;
newh = GetValue("Height of animation? (enter 0 to keep current height)", 640);
steps = GetValue("Number of steps", 360);
xinc = GetValue("X-axis rotation increment (in degrees)", 0);
yinc = GetValue("Y-axis rotation increment (in degrees)", 1);
zinc = GetValue("Z-axis rotation increment (in degrees)", 0);
method = GetValue("Animation encoder?
0: mpeg_encode (MPEG1), 1: mencoder (MPEG4), 2: whirlgif (GIF89)", 0);
......@@ -14,11 +14,11 @@ MPEG_ENCODE = 0;
MENCODER = 1;
WHIRLGIF = 2;
steps = GetValue("Number of steps", 360);
xinc = GetValue("X-axis rotation increment (in degrees)", 0);
yinc = GetValue("Y-axis rotation increment (in degrees)", 1);
zinc = GetValue("Z-axis rotation increment (in degrees)", 0);
oldr = General.Trackball;
oldw = General.GraphicsWidth;
oldh = General.GraphicsHeight;
General.Trackball = 0;
If(neww)
General.GraphicsWidth = neww;
EndIf
......@@ -26,19 +26,11 @@ If(newh)
General.GraphicsHeight = newh;
EndIf
Print.JpegQuality = 100;
General.Trackball = 0;
General.Light0X = 1;
General.Light0Y = 0;
General.Light0Z = 0;
index = 0;
For (1:steps)
General.RotationX += xinc;
General.RotationY += yinc;
General.RotationZ += zinc;
index++;
Draw;
If(method == WHIRLGIF)
......@@ -53,5 +45,6 @@ NUM_FRAMES = index;
ENCODER = method;
Include "encode.script";
General.Trackball = oldr;
General.GraphicsWidth = oldw;
General.GraphicsHeight = oldh;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment