diff -r 4c8abb8977dc -r ca7d4c665531 demos/render_nff.py --- a/demos/render_nff.py Thu May 08 09:21:25 2008 +0200 +++ b/demos/render_nff.py Sat May 10 14:29:37 2008 +0200 @@ -18,10 +18,12 @@ mat = Material(colour=(1.0, 1.0, 1.0)) f = sys.stdin -fbase = "render_nff" +fout = "render_nff.png" if len(sys.argv) > 1: f = open(sys.argv[1]) - fbase = sys.argv[1].rsplit('.',1)[0] + fout = sys.argv[1].rsplit('.',1)[0] + '.png' +if len(sys.argv) > 2: + fout = sys.argv[2] while True: line = f.readline() @@ -104,4 +106,4 @@ sampler = DefaultSampler(imagesize) rt.setSampler(sampler) rt.render() -sampler.getPixmap().writePNG(fbase+'.png') +sampler.getPixmap().writePNG(fout)