diff --git a/bin/curvecalc b/bin/curvecalc --- a/bin/curvecalc +++ b/bin/curvecalc @@ -99,8 +99,8 @@ class Main(object): curveView = self.curvesetView.row(subName).curveView t = self.lastSeenInputTime # curveView.current_time() # new curve hasn't heard the time yet. this has gotten too messy- everyone just needs to be able to reach the time source print "time", t - curveView.add_point((t - .5, 0)) - curveView.add_point((t, 1)) + curveView.add_points([(t - .5, 0), + (t, 1)]) def onNewCurve(self, *args): diff --git a/light9/curvecalc/curveview.py b/light9/curvecalc/curveview.py --- a/light9/curvecalc/curveview.py +++ b/light9/curvecalc/curveview.py @@ -837,10 +837,13 @@ class Curveview(object): y = self.curve.eval(x) self.add_point((x, y)) + def add_points(self, pts): + idxs = [self.curve.insert_pt(p) for p in pts] + self.update_curve() + self.select_indices(idxs) + def add_point(self, p): - i = self.curve.insert_pt(p) - self.update_curve() - self.select_indices([i]) + self.add_points([p]) def add_marker(self, p): self.markers.insert_pt(p)