mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Fixups in main.py
This commit is contained in:
parent
3a84116515
commit
a2b1df96f9
4
main.py
4
main.py
@ -76,7 +76,6 @@ def main(args, prof):
|
|||||||
frames = (f for f in frames
|
frames = (f for f in frames
|
||||||
if not os.path.isfile(f[0]) or m > os.path.getmtime(f[0]))
|
if not os.path.isfile(f[0]) or m > os.path.getmtime(f[0]))
|
||||||
|
|
||||||
w, h = gprof.width, gprof.height
|
|
||||||
gen = rmgr.render(gnm, gprof, frames)
|
gen = rmgr.render(gnm, gprof, frames)
|
||||||
|
|
||||||
if not args.gfx:
|
if not args.gfx:
|
||||||
@ -85,6 +84,7 @@ def main(args, prof):
|
|||||||
return
|
return
|
||||||
|
|
||||||
import pyglet
|
import pyglet
|
||||||
|
w, h = gprof.width, gprof.height
|
||||||
window = pyglet.window.Window(w, h, vsync=False)
|
window = pyglet.window.Window(w, h, vsync=False)
|
||||||
image = pyglet.image.CheckerImagePattern().create_image(w, h)
|
image = pyglet.image.CheckerImagePattern().create_image(w, h)
|
||||||
label = pyglet.text.Label('Rendering first frame', x=5, y=h-5,
|
label = pyglet.text.Label('Rendering first frame', x=5, y=h-5,
|
||||||
@ -190,7 +190,7 @@ if __name__ == "__main__":
|
|||||||
prof = dict(profiles[args.prof])
|
prof = dict(profiles[args.prof])
|
||||||
if args.pfile:
|
if args.pfile:
|
||||||
prof = json.load(open(args.pfile))
|
prof = json.load(open(args.pfile))
|
||||||
for k in ['duration', 'skip', 'quality', 'fps']:
|
for k in ['duration', 'skip', 'quality', 'fps', 'width', 'height']:
|
||||||
if getattr(args, k) is not None:
|
if getattr(args, k) is not None:
|
||||||
prof[k] = getattr(args, k)
|
prof[k] = getattr(args, k)
|
||||||
if args.still:
|
if args.still:
|
||||||
|
Loading…
Reference in New Issue
Block a user