109 |
|
|
110 |
if (jpeg): |
if (jpeg): |
111 |
print 'Saving background texture into %s%s-paper.gen.jpg.' % (str(seed), scalePostfix) |
print 'Saving background texture into %s%s-paper.gen.jpg.' % (str(seed), scalePostfix) |
112 |
saveanim.saveframe('bgfile.tmp', w, 0, 0, 384, 384) |
saveanim.saveframe('bgfile.tmp', w, 0, 0, 384*scale, 384*scale) |
113 |
os.system("convert -quality 95 %s %s" \ |
os.system("convert -quality 95 %s %s" \ |
114 |
% ('bgfile.tmp', basedir+str(seed)+'%s-paper.gen.jpg' % (scalePostfix))) |
% ('bgfile.tmp', basedir+str(seed)+'%s-paper.gen.jpg' % (scalePostfix))) |
115 |
os.system("rm bgfile.tmp") |
os.system("rm bgfile.tmp") |
117 |
else: |
else: |
118 |
print 'Saving background texture into %s%s-paper.gen.png.' % (str(seed), scalePostfix) |
print 'Saving background texture into %s%s-paper.gen.png.' % (str(seed), scalePostfix) |
119 |
saveanim.saveframe(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix), |
saveanim.saveframe(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix), |
120 |
w, 0, 0, 384, 384) |
w, 0, 0, 384*scale, 384*scale) |
121 |
return os.path.abspath(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix)) |
return os.path.abspath(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix)) |
122 |
|
|
123 |
class Main(Runnable): |
class Main(Runnable): |
125 |
global ThePaperMill, w |
global ThePaperMill, w |
126 |
from vob.paper.papermill import ThePaperMill |
from vob.paper.papermill import ThePaperMill |
127 |
|
|
128 |
w = gfxapi.createWindow() |
# w = gfxapi.createWindow() |
129 |
w.setLocation(0,0,384,384) |
|
130 |
|
# pbuffer |
131 |
|
w = gfxapi.createStableOffscreen(1536, 1536) |
132 |
|
|
133 |
|
#w.setLocation(0,0,384,384) |
134 |
vs = w.createVobScene() |
vs = w.createVobScene() |
135 |
print "Working directory:", basedir |
print "Working directory:", basedir |
136 |
|
|