mirror of
				https://github.com/stevenrobertson/cuburn.git
				synced 2025-11-03 18:00:55 -05:00 
			
		
		
		
	Add --nopause option for batch with preview
This commit is contained in:
		
							
								
								
									
										9
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								main.py
									
									
									
									
									
								
							@ -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
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user