home *** CD-ROM | disk | FTP | other *** search
- /*
- * $VER: SaveRenderedAs.ifx.pre 2.5 (11.04.96)
- * Copyright © 1992-1996 Nova Design, Inc.
- * Written by Thomas Krehbiel
- *
- * Save rendered image.
- *
- * Inputs:
- * Word(Arg(1),1) = Sequence number (?)
- * Word(Arg(1),2) = Total number of frames (N)
- *
- * Returns:
- * 0 if successful, non-zero on failure
- *
- * Revision History:
- *
- * 25.09.95 tek 2.1a: Fixed extension setting.
- */
-
- OPTIONS RESULTS
-
- seq = WORD(ARG(1),1)
-
- lastpath = GETCLIP('Autofx_SaveRenderAs_Path'||seq)
- lasttype = GETCLIP('Autofx_SaveRenderAs_Type'||seq)
- lastopts = GETCLIP('Autofx_SaveRenderAs_Opts'||seq)
- lastext = GETCLIP('Autofx_SaveRenderAs_Ext'||seq)
-
- IF lastext = "" & lastpath = "" THEN lastext = ".new"
-
- IF lastpath = "" THEN DO
- GetPrefs RendPath
- lastpath = result
- END
-
- IF lasttype = "" THEN lasttype = "ILBM"
-
- Gadget.1 = 'STRING 120 5 200 14 "Output Path:" "'lastpath'"'
- Gadget.2 = 'STRING 120 20 80 14 "Output Format:" "'lasttype'"'
- Gadget.3 = 'STRING 120 35 200 14 "Format Options:" "'lastopts'"'
- Gadget.4 = 'FILEREQ 321 5 20 14 "Output Path:" "'lastpath'" AT=1 DIRONLY'
- Gadget.5 = 'TEXT 206 23 1 1 "EG: ILBM, JPEG, TIFF" 1'
- Gadget.6 = 'STRING 120 50 200 14 "New Extension:" "'lastext'"'
- Gadget.7 = 'TEXT 120 66 1 1 "(** = current frame number)" 1'
- Gadget.8 = 'END'
-
- NewComplexRequest '"Save Rendered Image As"' Gadget 360 84
- IF rc ~= 0 THEN EXIT rc
-
- lastpath = result.1
- lasttype = result.2
- lastopts = result.3
- lastext = result.6
-
- CALL SETCLIP('Autofx_SaveRenderAs_Path'||seq, lastpath)
- CALL SETCLIP('Autofx_SaveRenderAs_Type'||seq, lasttype)
- CALL SETCLIP('Autofx_SaveRenderAs_Opts'||seq, lastopts)
- CALL SETCLIP('Autofx_SaveRenderAs_Ext'||seq, lastext)
-
- EXIT
-