Mercurial > code > home > repos > light9
changeset 454:fb888a771b42
curvecalc now starts up showing the whole time range
author | drewp@bigasterisk.com |
---|---|
date | Sun, 15 Jun 2008 23:11:48 +0000 |
parents | c5db6b332030 |
children | 9dd2baa41cca |
files | bin/curvecalc light9/curve.py light9/zoomcontrol.py |
diffstat | 3 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/curvecalc Sun Jun 15 01:55:46 2008 +0000 +++ b/bin/curvecalc Sun Jun 15 23:11:48 2008 +0000 @@ -433,6 +433,7 @@ maxtime = wavelength(musicfilename) dispatcher.send("max time",maxtime=maxtime) dispatcher.connect(lambda: maxtime, "get max time",weak=0) +dispatcher.send("show all") curveset.load(basename=os.path.join(showconfig.curvesDir(), showconfig.songFilenameFromURI(song)), skipMusic=opts.skip_music) @@ -461,7 +462,7 @@ root.bind("<Control-Key-r>", lambda evt: dispatcher.send('reload all subs')) create_status_lines(root) -for helpline in ["Bindings: C-s save subterms; Esc see current time; S-Esc see curtime to end; Mousewheel zoom; C-p play/pause music at mouse", +for helpline in ["Bindings: C-s save subterms; Esc see current time; S-Esc see curtime to end; C-Esc show all; Mousewheel zoom; C-p play/pause music at mouse", "Curve point bindings: B1 drag point; C-B1 curve add point; S-B1 sketch points; Del selected points; 1..5 add point at time; B1 drag select points", "Available in functions: nsin/ncos period=amp=1; within(a,b) bef(x) aft(x) compare to time; smoove(x) cubic smoothstep; chan(name); curvename(t) eval curve"]: tk.Label(root,text=helpline, font="Helvetica -12 italic",
--- a/light9/curve.py Sun Jun 15 01:55:46 2008 +0000 +++ b/light9/curve.py Sun Jun 15 23:11:48 2008 +0000 @@ -183,6 +183,7 @@ self.bind("<Shift-Escape>", lambda ev: dispatcher.send("see time until end", t=self.current_time())) + self.bind("<Control-Escape>", lambda ev: dispatcher.send("show all")) self.bind("<Control-p>", lambda ev: dispatcher.send("music seek", t=self.world_from_screen(ev.x,0)[0]))
--- a/light9/zoomcontrol.py Sun Jun 15 01:55:46 2008 +0000 +++ b/light9/zoomcontrol.py Sun Jun 15 23:11:48 2008 +0000 @@ -81,6 +81,7 @@ dispatcher.connect(self.zoom_about_mouse, "zoom about mouse") dispatcher.connect(self.see_time, "see time") dispatcher.connect(self.see_time_until_end, "see time until end") + dispatcher.connect(self.show_all, "show all") dispatcher.connect(self.zoom_to_range, "zoom to range") self.created=1 def zoom_to_range(self,start,end): @@ -88,6 +89,11 @@ self.end = end self.redrawzoom() + def show_all(self): + self.start = self.mintime + self.end = self.maxtime + self.redrawzoom() + def zoom_about_mouse(self,t,factor): self.start = t - factor*(t-self.start) self.end = t + factor*(self.end-t)