# HG changeset patch # User drewp@bigasterisk.com # Date 2012-06-16 01:33:36 # Node ID 634e8a3ebd0afe28a022976b2b44592f6c8b5acb # Parent f22f925442a223e7280a3b3d88ce04d90c73aa8a when you drag a sub into CC and it makes a new fade, leave both points in the fade selected Ignore-this: e001a167b42b7c5471a0b2f240b2d12d 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)