/* example Postscript script file for MPMorph */
/* This uses MKANIM to generate an Animation  */
/*
 * Assumes frames are 1..n and first and last
 * frames are being rendered.
 *
 * Output file is t:MPM_Anim
 */
/* $VER: PostAnim_MPM 4.4 (23.2.97)
 */
parse arg Frame TotalFrames Single FileName
/* Frame       - current frame number starting from Start frame
 * TotalFrames - total number of frames
 * Single      - 1 for Single image warp, 0 for two image morph, 2 for Anim Morph, 3 for Anim Warp
 * FileName    - Name of 24 bit image just produced
 */

if (Frame = 0) then do
	if ~open('MPMfile','t:MPM_genanim','w') then do
		return 10
	end
end
else do
	if ~open('MPMfile','t:MPM_genanim','a') then do
		return 10
	end
end

call writeln('MPMfile','10 '||FileName)
call close('MPMfile')

if (Frame = TotalFrames+1) then do
	address command "mkanim t:MPM_genanim t:MPM_Anim"
end

exit