Changeset - c74fe7efabc1
[Not reviewed]
default
0 1 0
dmcc - 22 years ago 2002-07-11 15:27:17

Submaster analysis to help with gel pickage
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
light8/sub_analyzer.py
Show inline comments
 
#!/usr/bin/python
 
from Subs import *
 
from Patch import *
 
from types import TupleType
 

	
 
from Config import patch, subs
 

	
 
import re
 
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'
 
colors = 'ndcihs'
 

	
 
color_chart = {
 
@@ -55,14 +58,13 @@ scene_names = {
 
    '2-06' : 'marry (trav)',
 
    '2-07' : 'finale (broadway)',
 
}
 

	
 
sub_to_scene = {}
 

	
 
# blacklist is a list of *prefixes* to light names that won't be shown
 
blacklist = 'god upfill red blue cyc oran sidefill'.split()
 
blacklist = 'god upfill1 upfill2 upfill3 upfill4 red1 red2 red3 red4 blue1 blue2 blue3 blue4 cycleft cycright sidefill1 sidefill2'.split()
 
blacklist.extend(['side l','side r'])
 

	
 
for subname, levdict in subs.items():
 
    if type(subname) == TupleType:
 
        subname = subname[0]
 
    oldname = subname
 
@@ -80,15 +82,13 @@ for subname, levdict in subs.items():
 
                subusage[ch].append((lev, subname))
 

	
 
def twist(l):
 
    return [(b,a) for a,b in l]
 

	
 
def format_usage(ch, usage):
 
    if max([ch.startswith(pre) for pre in blacklist]):
 
        return
 
    
 
    if ch in blacklist: return
 
    usage=twist(usage)
 
    usage.sort()
 
#    usage.reverse()
 
    usage=twist(usage)
 
    print "======= %s ======= (%d uses)" % (ch, len(usage))
 
    if 1:
0 comments (0 inline, 0 general)