Add --nopause option for batch with preview

This commit is contained in:
Steven Robertson 2011-10-16 13:52:27 -04:00
parent 6c2df777b0
commit 6144601259

View File

@ -176,8 +176,11 @@ def main(args):
def poll(dt): def poll(dt):
out = next(frames, False) out = next(frames, False)
if out is False: if out is False:
label.text = "Done. ('q' to quit)" if args.nopause:
pyglet.clock.unschedule(poll) pyglet.app.exit()
else:
label.text = "Done. ('q' to quit)"
pyglet.clock.unschedule(poll)
elif out is not None: elif out is not None:
real_dt = time.time() - last_time[0] real_dt = time.time() - last_time[0]
last_time[0] = time.time() last_time[0] = time.time()
@ -219,6 +222,8 @@ if __name__ == "__main__":
help="Do not render any frame for which a .png already exists.") help="Do not render any frame for which a .png already exists.")
parser.add_argument('--raw', action='store_true', dest='raw', parser.add_argument('--raw', action='store_true', dest='raw',
help="Do not write files; instead, send raw RGBA data to stdout.") help="Do not write files; instead, send raw RGBA data to stdout.")
parser.add_argument('--nopause', action='store_true',
help="Don't pause after rendering when preview is up")
seq = parser.add_argument_group('Sequence options', description=""" seq = parser.add_argument_group('Sequence options', description="""
Control which frames are rendered from a genome sequence. If '-k' is Control which frames are rendered from a genome sequence. If '-k' is