{ Flame2File v.0.8b - Flame to File author Giovanni Rubaltelli "Exper" - exper.3drecursions.com 20/Oct./2006 Released under GPL License - http://www.gnu.org/copyleft/gpl.html Install: Download "Flame2File_Utils" here: http://exper.3drecursions.com/apo_scripts/Flame2File_utils.zip Copy "jpegtopnm.exe", "pnmcat.exe", "pnmscale.exe", "pnmtojpeg.exe", "libnetpbm10.dll" and "jpeg62.dll" to Flam3 directory (normally "c:\flam3\"). Flame2File v.0.8 needs them to create the same "Sheep preview image" as ES's server one. NOTE: "jpegtopnm.exe", "pnmcat.exe", "pnmscale.exe", "pnmtojpeg.exe" and "libnetpbm10.dll" are part of "Netpbm" Project: http://netpbm.sourceforge.net/ "jpeg62.dll" is part of "GnuWin32" Project: http://gnuwin32.sourceforge.net/ Description: Flame2File is script that extracts Apophysis Flames files to single Flame files. Useful for ESheep server uploading or Apophysis/Flam3 rendering. It can also render tem extracted files using Flam3 or Apophysis; starting from v.0.7 it can also create Sheep frames and a Sheep Preview Image ala ES (Sheep overall loop-motion). Usage: Save or Show - Extract Flames or simply Show indexed names (useful for Range option). Show option also create a text File that reports all the indexed names. Example: "Test.flame" produces "Test.flame_index.txt" Prefix - sets the prefix for Flame saving; no leading chars added. Output path - where you want save the extracted Flames. Save Range - let you Extract all Flames, only a sub-range or a single Flame of current Flame file. Start at n. - first flame End at n. - last flame Select preferred Renderer - let you select if you want simply Extract flames out of current Flame file or if you want Extract and Render them using Flam3 or Apophysis Create single/multiple "batch" files - Flam3 specific option Let you create a Batch file for every flame or a single batch file for all the extracted flames. Useful for rendering single or multiple flames in a mouse-click using Flam3. NOTE: Single "batch" mode also produces a simple LOG file that it's automatically deleted at the end of the overall rendering process. This is expecially useful for long batches: the LOG file can quite easily show at which point the rendering process was halted (before the end). Editing and executing the "batch" file again can restart the rendering process. Flam3 software path - Flam3 specific option Point to Flam3 installation path Render Quality - self explanatory Flam3 Batches - Flam3 specific option Let you select how many Flam3 Motion-Blur you need (using the old Batches mode). This is no more supported starting at_flam3-2.7 beta 8 (flam3-2.7b8) The "Batches" tag was replaced by "Passes" tag but Apo Flame class supports only the first one. Filter Radius - let you select how much filtering do you want apply Oversample - render using Oversample, let you select Oversample value. Background Transparency - Flam3 specific option Activate the Flam3 Transparency - OFF by default Filetype (jpg/png) - Flam3 specific option - saving file format for Flam3 option Filetype (jpg/png/bmp) - Apophysis specific option - saving file format for Apophysis option Make Sheep - Flam3 specific option Create an ESheep flame and renders the frames using Flam3 Sheep Preview - Flam3 specific option Render the ESheep flame using a 8 frames Step. Useful to create a preview similar to the ESheep server one. Sheep Preview Image Size? Small=0 - Medium=1 - Large=2' - Flam3 specific option Create a Preview Image ala ES (Sheep overall loop-motion). Select the Preview Image resolution; the image is created using a 4x4 combo out of the Sheep Preview frames. Small = 256x192 - Medium = 640x480 - Large = 1280x960 NOTE: it's only available when Filetype option is "jpg". Delete Sheep Frames? - Flam3 + "Sheep Preview Image Size?" specific option Delete Sheep Preview frames. Useful if you want store the "Sheep Preview Image" only. } outputPath := 'c:\renders\'; flam3path := 'c:\flam3'; show := 0; fprefix := ''; range := 0; fstart := 0; fend := 1; sheep:=0; psheep:=0; tback:=0; spfdel:=0; spfsize:=0; q := 500; f := 0.4; o := 2; t := 'jpg'; ba := 50; stp :=1; pstp := 0; rbats := 0; f3r := 1; if not InputQuery('Parameter Input', 'Save or Show? Save=0 - Show=1', show) then exit; if(show=0) then if not InputQuery('Parameter Input', 'Prefix:', fprefix) then exit; if not InputQuery('Parameter Input', 'Output path:', outputPath) then exit; if(show=0) then begin if not InputQuery('Parameter Input', 'Save Range? No=0 - Yes=1 - Single=2', range) then range:=0; if(range=1) then begin if not InputQuery('Parameter Input', 'Start at n.', fstart) then fstart:=0; if(fend3) then rbats:=3; if (f3r<2) then begin if(rbats>0) then begin if(f3r=1) then begin if not InputQuery('Parameter Input', 'Flam3 software path:', flam3path) then exit; end; end; if not InputQuery('Parameter Input', 'Render Quality:', q) then exit; if(rbats>0) then begin if(f3r=1) then if not InputQuery('Parameter Input', 'Flam3 Batches:', ba) then exit; end; if not InputQuery('Parameter Input', 'Filter Radius:', f) then exit; if not InputQuery('Parameter Input', 'Oversample:', o) then exit; if(rbats>0) then begin if(f3r=1) then begin if not InputQuery('Parameter Input', 'Background Transparency: Yes=1 - No=0', tback) then tback:=0; if not InputQuery('Parameter Input', 'Filetype (jpg/png):', t) then exit; if(t<>'jpg') then if(t<>'png') then begin t:='jpg'; end; if not InputQuery('Parameter Input', 'Make Sheep? Yes = 1 - No = 0', sheep) then sheep:=0; if(sheep=1) then begin if not InputQuery('Parameter Input', 'Sheep Preview? Yes = 1 - No = 0', psheep) then psheep:=0; if(t='jpg') then begin if not InputQuery('Parameter Input', 'Sheep Preview Image Size? Small=0 - Medium=1 - Large=2', spfsize) then spfsize:=0; if(spfsize<0) then spfsize:=0; else if(spfsize>2) then spfsize:=2; if(spfsize=0) then spfsize:=0.1; else if(spfsize=1) then spfsize:=0.25; else if(spfsize=2) then spfsize:=0.5; if not InputQuery('Parameter Input', 'Delete Sheep Frames? Yes = 1 - No = 0', spfdel) then spfdel:=0; end; end; end; end; else if(f3r=0) then begin if not InputQuery('Parameter Input', 'Filetype (jpg/png/bmp):', t) then exit; if(t<>'jpg') then if(t<>'png') then if(t<>'bmp') then begin t:='jpg'; end; end; end; end; // apopath := outputpath; outputpath := Trim(outputPath); flam3path := Trim(flam3path); if(show=1) then begin if(fprefix='') then begin fname:=CurrentFile; fprefix := ExtractFileName(fname); end; FileList := TstringList.create; for fl := 0 to FileCount-1 do begin LoadFlame(fl); fname := Flame.name; msg := Format('%.3d', [fl]) + ' - ' + fname; print(msg); ShowStatus(msg); FileList.Add(msg); end; FileList.SaveToFile(outputpath + fprefix + '_index.txt'); FileList.Free; LoadFlame(0); exit; end; if(sheep=1) then if(sheep=1) then begin FileList := TstringList.create; FileList.Add(''); FileList.SaveToFile(flam3path + '\' + 'flame2file_template.flam3'); FileList.Free; end; if(range=0) then begin if(rbats=3) then FileList := TstringList.create; for fl := 0 to FileCount-1 do begin LoadFlame(fl); flame.SampleDensity := q; flame.Quality := q; flame.Oversample := o; flame.FilterRadius := f; if(f3r=1) then flame.Batches := ba; fname := fprefix + Flame.name; if(show=0) then msg := 'Saving "' + fname +'"'; else msg:= IntToStr(fl) + ' - ' + fname; print(msg); ShowStatus(msg); if(show=0) then begin saveFlame(outputpath + fname + '.flame'); if (rbats>0) then begin if(rbats=1) then FileList := TstringList.create; FileList.Add(''); FileList.Add('@echo off'); FileList.Add('rem CURRENT FILE - "' + outputpath + fname + '.flame"'); FileList.Add('set verbose=1'); FileList.Add('set format=' + t); FileList.Add('set jpeg=100'); FileList.Add('set bits=64'); FileList.Add('set transparency='+ IntToStr(tback)); FileList.Add('set prefix=' + fname + '_'); if(rbats=3) then FileList.Add('echo ' + fname + ' - Starting rendering >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('@echo on'); FileList.Add('"' + flam3path + '\flam3-render" < ' + '"' + outputpath + fname + '.flame"'); if(rbats=3) then begin FileList.Add('@echo off'); FileList.Add('echo ' + fname + ' - Rendered - Check File >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('echo ---------------- >>'+ outputpath + fprefix + 'render_log.txt'); end; if(sheep=1) then begin FileList.Add('@echo off'); FileList.Add('set bits=32'); FileList.Add('set nframes=128'); FileList.Add('set template=' + flam3path + '\' + 'flame2file_template.flam3'); FileList.Add('set sequence=' + outputpath + fname + '.flame'); FileList.Add('"' + flam3path + '\flam3-genome" > ' + '"' + outputpath + fname + '_sheep.flame"'); if(psheep=1) then FileList.Add('set dtime=8'); else FileList.Add('set dtime=1'); FileList.Add('set transparency=0'); FileList.Add('set prefix=' + fname + '_sheep_'); if(rbats=3) then FileList.Add('echo ' + fname + ' - Sheep - Starting rendering >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('@echo on'); FileList.Add('"' + flam3path + '\flam3-animate" < ' + '"' + outputpath + fname + '_sheep.flame"'); if(psheep=1) then begin if(t='jpg') then begin FileList.Add('@echo off'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0000.jpg >' + outputpath + fname + '_sheep_0000.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0008.jpg >' + outputpath + fname + '_sheep_0008.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0016.jpg >' + outputpath + fname + '_sheep_0016.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0024.jpg >' + outputpath + fname + '_sheep_0024.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0032.jpg >' + outputpath + fname + '_sheep_0032.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0040.jpg >' + outputpath + fname + '_sheep_0040.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0048.jpg >' + outputpath + fname + '_sheep_0048.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0056.jpg >' + outputpath + fname + '_sheep_0056.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0064.jpg >' + outputpath + fname + '_sheep_0064.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0072.jpg >' + outputpath + fname + '_sheep_0072.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0080.jpg >' + outputpath + fname + '_sheep_0080.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0088.jpg >' + outputpath + fname + '_sheep_0088.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0096.jpg >' + outputpath + fname + '_sheep_0096.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0104.jpg >' + outputpath + fname + '_sheep_0104.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0112.jpg >' + outputpath + fname + '_sheep_0112.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0120.jpg >' + outputpath + fname + '_sheep_0120.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0000.ppm >' + outputpath + fname + '_sheep_0000s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0008.ppm >' + outputpath + fname + '_sheep_0008s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0016.ppm >' + outputpath + fname + '_sheep_0016s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0024.ppm >' + outputpath + fname + '_sheep_0024s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0032.ppm >' + outputpath + fname + '_sheep_0032s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0040.ppm >' + outputpath + fname + '_sheep_0040s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0048.ppm >' + outputpath + fname + '_sheep_0048s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0056.ppm >' + outputpath + fname + '_sheep_0056s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0064.ppm >' + outputpath + fname + '_sheep_0064s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0072.ppm >' + outputpath + fname + '_sheep_0072s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0080.ppm >' + outputpath + fname + '_sheep_0080s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0088.ppm >' + outputpath + fname + '_sheep_0088s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0096.ppm >' + outputpath + fname + '_sheep_0096s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0104.ppm >' + outputpath + fname + '_sheep_0104s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0112.ppm >' + outputpath + fname + '_sheep_0112s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0120.ppm >' + outputpath + fname + '_sheep_0120s.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0000s.ppm ' + outputpath + fname + '_sheep_0008s.ppm ' + outputpath + fname + '_sheep_0016s.ppm ' + outputpath + fname + '_sheep_0024s.ppm >' + outputpath + fname + '_sheep_prv1.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0032s.ppm ' + outputpath + fname + '_sheep_0040s.ppm ' + outputpath + fname + '_sheep_0048s.ppm ' + outputpath + fname + '_sheep_0056s.ppm >' + outputpath + fname + '_sheep_prv2.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0064s.ppm ' + outputpath + fname + '_sheep_0072s.ppm ' + outputpath + fname + '_sheep_0080s.ppm ' + outputpath + fname + '_sheep_0088s.ppm >' + outputpath + fname + '_sheep_prv3.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0096s.ppm ' + outputpath + fname + '_sheep_0104s.ppm ' + outputpath + fname + '_sheep_0112s.ppm ' + outputpath + fname + '_sheep_0120s.ppm >' + outputpath + fname + '_sheep_prv4.ppm'); FileList.Add(flam3path + '\pnmcat -tb ' + outputpath + fname + '_sheep_prv1.ppm ' + outputpath + fname + '_sheep_prv2.ppm ' + outputpath + fname + '_sheep_prv3.ppm ' + outputpath + fname + '_sheep_prv4.ppm >' + outputpath + fname + '_sheep_prv.ppm'); FileList.Add(flam3path + '\pnmtojpeg -quality=80 ' + outputpath + fname + '_sheep_prv.ppm >' + outputpath + fname + '_sheep_prv.jpg'); FileList.Add('del ' + outputpath + fname + '_sheep_*.ppm'); if(spfdel=1) then FileList.Add('del ' + outputpath + fname + '_sheep_0*.jpg'); end; end; if(rbats=3) then begin if(sheep=1) then FileList.Add('echo ' + fname + ' - Sheep - Rendered - Check Files >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('echo ---------------- >>'+ outputpath + fprefix + 'render_log.txt'); end; end; end; // Ending code if(rbats=1) then begin if(sheep=1) then begin FileList.Add('@echo off'); // FileList.Add('del "' + flam3path + '\' + 'flame2file_template.flam3"'); FileList.Add('@echo on'); end; FileList.SaveToFile(outputpath + fname + '.bat'); FileList.Free; end; else if(rbats=3) then begin FileList.SaveToFile(outputpath + fprefix + 'render.bat'); end; end; end; if(rbats=3) then begin if(sheep=1) then begin FileList.Add('@echo off'); FileList.Add('del "' + flam3path + '\' + 'flame2file_template.flam3"'); FileList.Add('@echo on'); end; FileList.Add('@echo off'); FileList.Add('del ' + outputpath + fprefix + 'render_log.txt'); FileList.Add('@echo on'); FileList.SaveToFile(outputpath + fprefix + 'render.bat'); FileList.Free; end; if(f3r=0) then begin for fl := 0 to FileCount-1 do begin LoadFlame(fl); Renderer.Width := Flame.Width; Renderer.Height := Flame.Height; SetRenderBounds; fname := fprefix + Flame.name; msg := 'Rendering "' + fname +'"'; print(msg); ShowStatus(msg); Renderer.Filename := outputpath + fname + '.' + t; Render; end; end; end; else begin if(rbats=3) then FileList := TstringList.create; for fl := 0 to FileCount-1 do begin LoadFlame(fl); if(fl>=fstart) then begin if(fl<=fend) then begin flame.SampleDensity := q; flame.Oversample := o; flame.FilterRadius := f; flame.Batches := ba; fname := fprefix + Flame.name; msg := 'Saving "' + fname +'"'; print(msg); ShowStatus(msg); saveFlame(outputpath + fname + '.flame'); if (rbats>0) then begin if(rbats=1) then FileList := TstringList.create; FileList.Add('@echo off'); FileList.Add('set verbose=1'); FileList.Add('set format=' + t); FileList.Add('set jpeg=100'); FileList.Add('set bits=64'); FileList.Add('set prefix=' + fname + '_'); FileList.Add('@echo on'); if(rbats=3) then FileList.Add('echo ' + fname + ' - Starting rendering >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('"' + flam3path + '\flam3-render" < ' + '"' + outputpath+ fname + '.flame"'); if(rbats=3) then begin FileList.Add('@echo off'); FileList.Add('echo ' + fname + ' - Rendered - Check File >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('echo ---------------- >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('@echo on'); end; if(sheep=1) then begin FileList.Add('@echo off'); FileList.Add('set bits=32'); FileList.Add('set nframes=128'); FileList.Add('set template=' + flam3path + '\' + 'flame2file_template.flam3'); FileList.Add('set sequence=' + outputpath + fname + '.flame'); FileList.Add('"' + flam3path + '\flam3-genome" > ' + '"' + outputpath + fname + '_sheep.flame"'); if(psheep=1) then FileList.Add('set dtime=8'); else FileList.Add('set dtime=1'); FileList.Add('set transparency=0'); FileList.Add('set prefix=' + fname + '_sheep_'); if(rbats=3) then FileList.Add('echo ' + fname + ' - Sheep - Starting rendering >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('@echo on'); FileList.Add('"' + flam3path + '\flam3-animate" < ' + '"' + outputpath + fname + '_sheep.flame"'); if(psheep=1) then begin if(t='jpg') then begin FileList.Add('@echo off'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0000.jpg >' + outputpath + fname + '_sheep_0000.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0008.jpg >' + outputpath + fname + '_sheep_0008.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0016.jpg >' + outputpath + fname + '_sheep_0016.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0024.jpg >' + outputpath + fname + '_sheep_0024.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0032.jpg >' + outputpath + fname + '_sheep_0032.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0040.jpg >' + outputpath + fname + '_sheep_0040.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0048.jpg >' + outputpath + fname + '_sheep_0048.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0056.jpg >' + outputpath + fname + '_sheep_0056.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0064.jpg >' + outputpath + fname + '_sheep_0064.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0072.jpg >' + outputpath + fname + '_sheep_0072.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0080.jpg >' + outputpath + fname + '_sheep_0080.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0088.jpg >' + outputpath + fname + '_sheep_0088.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0096.jpg >' + outputpath + fname + '_sheep_0096.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0104.jpg >' + outputpath + fname + '_sheep_0104.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0112.jpg >' + outputpath + fname + '_sheep_0112.ppm'); FileList.Add(flam3path + '\jpegtopnm ' + outputpath + fname + '_sheep_0120.jpg >' + outputpath + fname + '_sheep_0120.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0000.ppm >' + outputpath + fname + '_sheep_0000s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0008.ppm >' + outputpath + fname + '_sheep_0008s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0016.ppm >' + outputpath + fname + '_sheep_0016s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0024.ppm >' + outputpath + fname + '_sheep_0024s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0032.ppm >' + outputpath + fname + '_sheep_0032s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0040.ppm >' + outputpath + fname + '_sheep_0040s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0048.ppm >' + outputpath + fname + '_sheep_0048s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0056.ppm >' + outputpath + fname + '_sheep_0056s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0064.ppm >' + outputpath + fname + '_sheep_0064s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0072.ppm >' + outputpath + fname + '_sheep_0072s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0080.ppm >' + outputpath + fname + '_sheep_0080s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0088.ppm >' + outputpath + fname + '_sheep_0088s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0096.ppm >' + outputpath + fname + '_sheep_0096s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0104.ppm >' + outputpath + fname + '_sheep_0104s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0112.ppm >' + outputpath + fname + '_sheep_0112s.ppm'); FileList.Add(flam3path + '\pnmscale ' + FloatToStr(spfsize) + ' ' + outputpath + fname + '_sheep_0120.ppm >' + outputpath + fname + '_sheep_0120s.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0000s.ppm ' + outputpath + fname + '_sheep_0008s.ppm ' + outputpath + fname + '_sheep_0016s.ppm ' + outputpath + fname + '_sheep_0024s.ppm >' + outputpath + fname + '_sheep_prv1.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0032s.ppm ' + outputpath + fname + '_sheep_0040s.ppm ' + outputpath + fname + '_sheep_0048s.ppm ' + outputpath + fname + '_sheep_0056s.ppm >' + outputpath + fname + '_sheep_prv2.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0064s.ppm ' + outputpath + fname + '_sheep_0072s.ppm ' + outputpath + fname + '_sheep_0080s.ppm ' + outputpath + fname + '_sheep_0088s.ppm >' + outputpath + fname + '_sheep_prv3.ppm'); FileList.Add(flam3path + '\pnmcat -lr ' + outputpath + fname + '_sheep_0096s.ppm ' + outputpath + fname + '_sheep_0104s.ppm ' + outputpath + fname + '_sheep_0112s.ppm ' + outputpath + fname + '_sheep_0120s.ppm >' + outputpath + fname + '_sheep_prv4.ppm'); FileList.Add(flam3path + '\pnmcat -tb ' + outputpath + fname + '_sheep_prv1.ppm ' + outputpath + fname + '_sheep_prv2.ppm ' + outputpath + fname + '_sheep_prv3.ppm ' + outputpath + fname + '_sheep_prv4.ppm >' + outputpath + fname + '_sheep_prv.ppm'); FileList.Add(flam3path + '\pnmtojpeg -quality=80 ' + outputpath + fname + '_sheep_prv.ppm >' + outputpath + fname + '_sheep_prv.jpg'); FileList.Add('del ' + outputpath + fname + '_sheep_*.ppm'); if(spfdel=1) then FileList.Add('del ' + outputpath + fname + '_sheep_0*.jpg'); end; end; if(rbats=3) then begin if(sheep=1) then FileList.Add('echo ' + fname + ' - Sheep - Rendered - Check Files >>'+ outputpath + fprefix + 'render_log.txt'); FileList.Add('echo ---------------- >>'+ outputpath + fprefix + 'render_log.txt'); end; end; end; // Ending code if(rbats=1) then begin if(sheep=1) then begin FileList.Add('@echo off'); FileList.Add('del "' + flam3path + '\' + 'flame2file_template.flam3"'); FileList.Add('@echo on'); end; FileList.SaveToFile(outputpath + fname + '.bat'); FileList.Free; end; else if(rbats=3) then begin FileList.SaveToFile(outputpath + fprefix + 'render.bat'); end; end; end; end; if(rbats=3) then begin if(sheep=1) then begin FileList.Add('@echo off'); FileList.Add('del "' + flam3path + '\' + 'flame2file_template.flam3"'); FileList.Add('@echo on'); end; FileList.Add('@echo off'); FileList.Add('del ' + outputpath + fprefix + 'render_log.txt'); FileList.Add('@echo on'); FileList.SaveToFile(outputpath + fprefix + 'render.bat'); FileList.Free; end; if(f3r=0) then begin for fl := 0 to FileCount-1 do begin LoadFlame(fl); if(fl>=fstart) then begin if(fl<=fend) then begin Renderer.Width := Flame.Width; Renderer.Height := Flame.Height; SetRenderBounds; fname := fprefix + Flame.name; msg := 'Rendering "' + fname +'"'; print(msg); ShowStatus(msg); Renderer.Filename := outputpath + fname + '.' + t; Render; end; end; end; end; end; if(show=0) then begin if(range=0) then msg := 'All Flames extracted!'; else msg:='Flame range. Extracted: ' + IntToStr(fstart) + ' - ' + IntToStr(fend); print(msg); ShowStatus(msg); end; UpdateFlame := False;