home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Raytracing / Objects / TAI-HFX1.LHA / FLYER.LZH / PUT.REXX < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-03-31  |  1.6 KB  |  75 lines

  1. /* FILE: GETSEQ.REXX - Gets a frame from a Flyer Clip */
  2.  
  3. options results
  4. TOASTERLIB="ToasterARexx.port"
  5.  
  6. /*** Get files and frame number from command line ***/
  7.  
  8. PARSE ARG fromname ',' clipname
  9.  
  10. /*** Exit LightWave ***/
  11.  
  12. ADDRESS 'LightWaveARexx.port'
  13. 'EnterSwitcher'
  14.  
  15. /*** Call command in separate process to start ToasterPaint ***/
  16. ADDRESS COMMAND
  17. 'Wait 1'
  18. 'RUN >NIL: RX HFX:FLYER/STARTTP'
  19. 'Wait 5'
  20.  
  21. /*** Send commands to ToasterPaint to extract the image ***/
  22.  
  23. ADDRESS 'DigiPaint'
  24.  
  25. /* Set output clip */
  26. 'Sacp'
  27. Call SetFile(clipname)
  28.  
  29. /* Load 24 bit image */
  30. Call LoadRGB(fromname)
  31.  
  32. /* Append the two fields to the clip */
  33. 'Apfc'
  34. 'Apfc'
  35.  
  36. /*** Quit ToasterPaint, return to Switcher ***/
  37. 'Quit'
  38.  
  39. /*** Run external program to Return to LightWave (won't exit till LightWave exits) ***/
  40.  
  41. ADDRESS COMMAND
  42. 'Wait 1'
  43. 'RUN >NIL: RX HFX:FLYER/STARTLW'
  44. 'Wait 2'
  45. exit
  46.  
  47.  
  48. SetFile: PROCEDURE      /* Select file in current requester */
  49.   arg file
  50.   dirname=GetPathName(file)
  51.   'Dnam'dirname            /* Enter file path  */
  52.   filename=GetFileName(file)
  53.   'Fnam'filename           /* Enter File name  */
  54.   'Okls'                   /* Hit the OK button  */
  55.   return
  56.  
  57. LoadRGB: PROCEDURE   
  58.   arg filename
  59.   'Lo24'    /* Call file requester  */
  60.    Call SetFile(filename)
  61.   return
  62.  
  63. GetFileName: procedure  /* Extract file name from full file specification */
  64.   ARG fullfile
  65.   c = lastpos("/",fullfile)
  66.   if c = 0 then c = lastpos(":",fullfile)
  67.   return substr(fullfile, c + 1)
  68.  
  69. GetPathName: procedure  /* Extract directory name from full file specification */
  70.   ARG fullfile
  71.   c = lastpos("/",fullfile)
  72.   if c = 0 then c = lastpos(":",fullfile)
  73.   return left(fullfile,c)
  74.  
  75.