Changeset - b2469273289e
[Not reviewed]
default
0 1 0
David McClosky - 18 years ago 2007-06-15 20:12:54
dmcc@bigasterisk.com
Submaster: set URI from loaded file
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/Submaster.py
Show inline comments
 
@@ -62,14 +62,14 @@ class Submaster:
 
            oldlevels = self.levels.copy()
 
            self.levels.clear()
 
            patchGraph = showconfig.getGraph()
 
            if graph is None:
 
                graph = Graph()
 
                graph.parse(showconfig.subFile(self.name), format="nt")
 
            subUri = L9['sub/%s' % self.name]
 
            for lev in graph.objects(subUri, L9['lightLevel']):
 
            self.uri = L9['sub/%s' % self.name]
 
            for lev in graph.objects(self.uri, L9['lightLevel']):
 
                chan = graph.value(lev, L9['channel'])
 
                val = graph.value(lev, L9['level'])
 
                name = patchGraph.label(chan)
 
                self.levels[name] = float(val)
 

	
 
            if (not quiet) and (oldlevels != self.levels):
 
@@ -230,12 +230,13 @@ class Submasters:
 
        for s in l:
 
            if s.name.startswith('song'):
 
                songs.append(s)
 
            else:
 
                notsongs.append(s)
 
        combined = notsongs + songs
 

	
 
        return combined
 
    def get_all_sub_names(self):
 
        return [s.name for s in self.get_all_subs()]
 
    def get_sub_by_name(self, name):
 
        "Makes a new sub if there isn't one."
 
        if name in self.submasters:
0 comments (0 inline, 0 general)