home *** CD-ROM | disk | FTP | other *** search
Wrap
/*************************/ /* Image Engineer script */ /* by Simon Edwards */ /*************************/ Options results signal on error /* Setup a place for errors to go */ 'REQUEST "This script generates animation frames" "Ok"' 'GET_NUMBER "Amount to bulge by" 1 100 "Ok|Cancel" 20' BulgeAmount=RESULT 'GET_NUMBER "Enter the number of frames to generate" 1 100 "Ok|Cancel" 10' NumberOfFrames=RESULT 'GET_FILE "Enter base path and file name"' BasePath=RESULT 'RENDER_GET COLOUR "Set render options"' RenderOptions=RESULT 'GET_FILE_TYPE "Select Save format"' SaveFormat=RESULT PROJECT_INFO arg(1) WIDTH ProWidth=RESULT PROJECT_INFO arg(1) HEIGHT ProHeight=RESULT XOffset=ProWidth/2 YOffset=ProHeight/2 if ProWidth<ProHeight then Radius=ProWidth/2 else Radius=ProHeight/2 do i=1 to NumberOfFrames 'BULGE' arg(1) XOffset YOffset Radius BulgeAmount*(i-1)/(NumberOfFrames-1) 'BEST' Frame=RESULT 'RENDER_SET' Frame RenderOptions 'RENDER' Frame 'SAVE' Frame '"'||BasePath||right(i,3,'0')||'" "'||SaveFormat||'"' 'CLOSE' Frame end 'REQUEST "Done, generated ' NumberOfFrames 'frames."' exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end