( ---------------------------------------------------------------------- ( Frame Command examples ( To try any of these, add the following line to your r3d2:s/rpl-startup: ( "r3d2:rpl/framecmd.rpl" LOAD ( ---------------------------------------------------------------------- 256 STRING sFileName 256 STRING sTmp ( Asks if the user wants to cancel the animation ( ---------------------------------------------- : FcAskUser "CONTINUE|CANCEL" "Frame Rendered" GET_KEY NOT IF "User Break" ERROR ENDIF ; ( This converts image file rendered by given View window to jpeg file ( by using the public domain program 'cjpeg' and deletes the original file. ( Takes one parameter which is the name of the View window used for ( rendering to a file. Note that 'cjpeg' understands only Targa or PPM. ( 'cjpeg' program is is based in part on the work of the Independent ( JPEG Group. 'cjpeg' is included in 'Accessories' drawer of the Real 3D ( installation. ( ----------------------------------------------------------------------- : FcCompress "attr(A:->flags)" EVAL AF_WIRE BAND IF ( If wireframe mode -> no action DROP ELSE ( build up string 'W:Viewname->filename' for attr() "attr(W:%s->filename)" sTmp SPRINTF ( create actual file name sTmp EVAL ( filename in given View window "attr(A:->currentfrm)" EVAL ( current frame "attr(A:->format)" EVAL ( format string: %s + index, e.g. %d sFileName SPRINTF ( filename + formatted index ( convert file sFileName sFileName "r3d2:accessories/cjpeg -q 95 %s %s.jpg" sTmp SPRINTF sTmp SYSTEM ( delete file sFileName "delete %s" sTmp SPRINTF sTmp SYSTEM ENDIF ;