Changeset - 95ed52dcc3ab
[Not reviewed]
default
0 2 0
Drew Perttula - 11 years ago 2014-06-10 08:46:52
drewp@bigasterisk.com
remove some old curve api
Ignore-this: 2a49d1f24d73b5cc8d718683c6b41793
2 files changed with 2 insertions and 9 deletions:
0 comments (0 inline, 0 general)
bin/curvecalc
Show inline comments
 
@@ -230,13 +230,13 @@ class Main(object):
 
        """
 
        raises SubtermExists if we had a subterm with a sub with the given
 
        name. what about a no-sub term with the same label? who knows
 
        """
 
        assert isinstance(newname, Literal), repr(newname)
 
        if withCurve:
 
            self.curveset.new_curve(newname, renameIfExisting=False)
 
            self.curveset.new_curve(newname)
 
        if newname in self.all_subterm_labels():
 
            raise SubtermExists("have a subterm who sub is named %r" % newname)
 
        with self.graph.currentState() as current:
 
            song = self.currentSong()
 
            for i in range(1000):
 
                uri = song + "/subterm/%d" % i
light9/curvecalc/curve.py
Show inline comments
 
@@ -343,22 +343,15 @@ class Curveset(object):
 
    def globalsdict(self):
 
        raise NotImplementedError('subterm used to get a dict of name:curve')
 
    
 
    def get_time_range(self):
 
        return 0, dispatcher.send("get max time")[0][1]
 

	
 
    def new_curve(self, name, renameIfExisting=True):
 
    def new_curve(self, name):
 
        if isinstance(name, Literal):
 
            name = str(name)
 
        if name=="":
 
            print "no name given"
 
            return
 
        if not renameIfExisting and name in self.curves:
 
            return
 
        while name in self.curves:
 
           name=name+"-1"
 

	
 
        uri = self.graph.sequentialUri(self.currentSong + '/curve-')
 

	
 
        cr = self.curveResources[uri] = CurveResource(self.graph, uri)
 
        cr.newCurve(ctx=self.currentSong, label=Literal(name))
 
        s, e = self.get_time_range()
0 comments (0 inline, 0 general)