home *** CD-ROM | disk | FTP | other *** search
- /**********************
-
-
- **********************/
-
- options results
-
- Gadget.1 = 'CYCLE 13 5 200 15 "" 0 Sequence/JStream/FlyerClip/ANIM'
- Gadget.2 = 'END'
-
- NewComplexRequest '"Save Format"' Gadget 226 30
- IF rc ~= 0 THEN EXIT
-
- savetype=result.1
-
-
- if savetype=0 then
- do
-
- SGadget.1 = 'CYCLE 13 5 200 15 "" 0 ILBM/JPEG_85/JPEG_50'
- SGadget.2 = 'END'
-
- NewComplexRequest '"File Format"' SGadget 226 30
- IF rc ~= 0 THEN EXIT
-
- seqfileformat=result.1
-
-
- RequestFile '"Basename"' '""' '""' '"#?"'
- if rc ~=0 then exit
- seqfile=Result
- end
-
- if savetype=1 then
- do
- RequestFile '"JStream"' '""' '""' '"#?"'
- if rc ~=0 then exit
- JSfile=Result
- end
-
- if savetype=2 then
- do
- RequestFile '"FlyerClip"' '""' '""' '"#?"'
- if rc ~=0 then exit
- FCfile=Result
- end
-
- if savetype=3 then
- do
- AGadget.1 = 'CYCLE 5 5 200 15 "" 0 Anim5/Anim7'
- AGadget.2 = 'CHECK 220 5 15 15 "Lock Palette?" 0 '
- AGadget.3 = 'END'
-
-
- NewComplexRequest '"Animation Format"' AGadget 350 30
- IF rc ~=0 THEN EXIT
-
- AType=result.1
- Alock=result.2
-
- Menu render
- requestresponse 'Animation will use current settings. Proceed?'
- if rc ~=0 then exit
- menu toolbox
-
- RequestFile '"Animation"' '""' '""' '"#?"'
- Animfile=Result
- end
-
- else nop
-
- layers=getclip('TM_TotalLayers')
-
- frames=getclip('TM_TotalFrames')
-
- do i = 1 to frames
-
- call setclip('TM_Renderframe',i)
-
- bgformat=getclip('TM_Layer0Type')
-
- if bgformat=0 then
- createbuffer getclip('TM_Layer0Width') getclip('TM_Layer0Height') force
-
- else if bgformat=1 then
- loadbuffer getclip('TM_Layer0Filename') force
-
- else if bgformat=2 then
- do
- digits=getclip('TM_Layer0Extension')
- num=RIGHT(i+getclip('TM_Layer0Start')-1,digits,'0')
- loadbuffer getclip('TM_Layer0Filename')||num force
- end
-
- else if bgformat=3 then
- do
- if getclip('TM_Layer0Freezeswitch')=0 then
- loadbufferas JStream getclip('TM_Layer0Filename') i+getclip('TM_Layer0Jstart')-1 both lace
- else
- loadbufferas JStream getclip('TM_Layer0Filename') getclip('TM_Layer0Jstart') both lace
- end
- else if bgformat=4 then
- do
- if getclip('TM_Layer0Freezeswitch')=0 then
- loadbuffer getclip('TM_Layer0Filename') i+getclip('TM_Layer0FCstart')-1
- else
- loadbuffer getclip('TM_Layer0Filename') getclip('TM_Layer0FCstart')
- end
-
- else if bgformat=5 then
- do
- if getclip('TM_Layer0Freezeswitch')=0 then
- loadbuffer getclip('TM_Layer0Filename') i+getclip('TM_Layer0Astart')-1
- else
- loadbuffer getclip('TM_Layer0Filename') getclip('TM_Layer0Astart') both lace
- end
-
-
- if getclip('TM_Layer0Script')='' then nop
- else
- rx getclip('TM_Layer0Script')
-
-
- /****** layers start here ********/
- if getclip('TM_TotalLayers')>1 then
- do a=1 to layers-1
-
- format=getclip('TM_Layer'a'Type')
-
- if format=1 then
- loadlayer getclip('TM_Layer'a'Filename')
-
- else if format=2 then
- do
- digits=getclip('TM_Layer'a'Extension')
- num=RIGHT(i+getclip('TM_Layer'a'Start')-1,digits,'0')
- loadlayer getclip('TM_Layer'a'Filename')||num force
- end
-
- else if format=3 then
- do
- if getclip('TM_Layer'a'Freezeswitch')=0 then
- loadlayer getclip('TM_Layer'a'Filename') i+getclip('TM_Layer'a'Jstart')-1 both lace
- else
- loadlayer getclip('TM_Layer'a'Filename') getclip('TM_Layer'a'Jstart') both lace
- end
- else if format=4 then
- do
- if getclip('TM_Layer'a'Freezeswitch')=0 then
- loadlayer getclip('TM_Layer'a'Filename') i+getclip('TM_Layer'a'FCstart')-1
- else
- loadlayer getclip('TM_Layer'a'Filename') getclip('TM_Layer'a'FCstart')
- end
-
- else if format=5 then
- do
- if getclip('TM_Layer'a'Freezeswitch')=0 then
- loadlayer getclip('TM_Layer'a'Filename') i+getclip('TM_Layer'a'Astart')-1
- else
- loadlayer getclip('TM_Layer'a'Filename') getclip('TM_Layer'a'Astart')
- end
-
- if getclip('TM_Layer'a'Mode')='' then nop
- else
- layermode getclip('TM_Layer'a'Mode')
-
- if getclip('TM_Layer'a'Blend')='' then nop
- else
- layerblend getclip('TM_Layer'a'Blend')
-
- if getclip('TM_Layer'a'PositionX')='' then nop
- else
- layeroffset getclip('TM_Layer'a'PositionX') getclip('TM_Layer'a'PositionY')
-
-
- if getclip('TM_Layer'a'Script')='' then nop
- else
- rx getclip('TM_Layer'a'Script')
-
- end
-
- flattenlayers
-
- if getclip('TM_PostScript')='' then nop
- else
- rx getclip('TM_PostScript')
-
-
-
- message 'Saving frame 'i
-
-
- if savetype = 0 then
- do
- ext = RIGHT(i,4,'0')
- if seqfileformat=0 then
- savebufferas ilbm seqfile||ext
- else if seqfileformat=1 then
- savebufferas jpeg seqfile||ext 85
- else if seqfileformat=2 then
- savebufferas jpeg seqfile||ext 50
- end
-
- else if savetype = 1 then
- savebufferas jstream JSFile append
-
- else if savetype = 2 then
- savebufferas flyerclip FCFile append
-
- else if savetype = 3 then
- do
- if ALock=1 then do
- if i =1 then
- lockrange 0 off
- else
- lockrange 0 on
- end
- else
- lockrange 0 off
-
- render go
-
- if AType=0 then
- saverenderedas ANIM Animfile keep append
- else
- saverenderedas ANIM7 Animfile keep append
-
- render close
- if i < frames then
- killall
- end
- end /* end of load_save loop */
-
- if savetype=3 then do
- if AType=0 then
- saverenderedas ANIM Animfile close
- else
- saverenderedas ANIM7 Animfile close
- end
-
-
-
- exit
-