blc2 - Python library and frontend for running theatrical lighting and SFX. Written for the English 2041F fall 2019 theatre production of "The Cenci".

git clone https://benconnors.ca/git-repos/blc2

Log | Files | Refs

commit 59ef8f9225098efa1512e048cea03b3a22bc7c11
parent 827f7f135bd49313de3e64f6804e57760d983eb8
Author: Ben Connors <benconnors@outlook.com>
Date:   Mon,  2 Dec 2019 10:56:34 -0500

Fix bug in rendering fade outs

- Now correctly adds start time

Diffstat:
Minterface/render.py | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/interface/render.py b/interface/render.py @@ -85,6 +85,7 @@ class Renderer: self._current = next_t - start t = int(1000*self._current) _last = {c: 0 for c in self._channels} + this_ap = set() for n, (f, d) in enumerate(zip(self._functions, self._data)): lc, ac, self._data[n] = f.render(t, d) for c, v in lc: @@ -92,6 +93,8 @@ class Renderer: _last[c] = v for guid, filename, start_t, fin, fstart, fout in ac: + this_ap.add(guid) + fstart += start_t if guid in running_ap: mul = 100 if t < fin: @@ -113,6 +116,12 @@ class Renderer: next_ap.append(nap) ap[guid] = nap + for a, p in tuple(ap.items()): + if a not in this_ap: + p.pause = True + del ap[a] + running_ap.remove(a) + self._last = _last self._update()