Mercurial > code > home > repos > light9
diff light8/sub_analyzer.py @ 85:174b35926067
converts subs from dicts to tab-sep-values and back again
author | drewp |
---|---|
date | Fri, 12 Jul 2002 12:07:38 +0000 |
parents | c74fe7efabc1 |
children | a995fd1a8f03 |
line wrap: on
line diff
--- a/light8/sub_analyzer.py Fri Jul 12 11:08:20 2002 +0000 +++ b/light8/sub_analyzer.py Fri Jul 12 12:07:38 2002 +0000 @@ -8,10 +8,6 @@ import Patch Patch.reload_data(0) -def resolve_name(channelname): - "Insure that we're talking about the primary name of the light" - return Patch.get_channel_name(Patch.get_dmx_channel(channelname)) - subusage = {} # colors = 'ROGBVndcihs' @@ -61,7 +57,8 @@ sub_to_scene = {} -blacklist = 'god upfill1 upfill2 upfill3 upfill4 red1 red2 red3 red4 blue1 blue2 blue3 blue4 cycleft cycright sidefill1 sidefill2'.split() +# blacklist is a list of *prefixes* to light names that won't be shown +blacklist = 'god upfill red blue cyc oran sidefill'.split() blacklist.extend(['side l','side r']) for subname, levdict in subs.items(): @@ -85,7 +82,9 @@ return [(b,a) for a,b in l] def format_usage(ch, usage): - if ch in blacklist: return + if max([ch.startswith(pre) for pre in blacklist]): + return + usage=twist(usage) usage.sort() # usage.reverse()