[pitivi] track.py, curve.py: when creating keyframes, calculate value so that it lies
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] track.py, curve.py: when creating keyframes, calculate value so that it lies
- Date: Tue, 4 Aug 2009 07:49:44 +0000 (UTC)
commit ed0173e51511642f0d228856e1186e6a6d172114
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Mon Aug 3 16:52:53 2009 -0700
track.py, curve.py: when creating keyframes, calculate value so that it lies
on the existing curve. fixes bug 589815
pitivi/timeline/track.py | 7 ++-----
pitivi/ui/curve.py | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index a951095..4c338ae 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -180,12 +180,9 @@ class Interpolator(Signallable, Loggable):
if isinstance(time_or_keyframe, Keyframe):
keyframe = time_or_keyframe
else:
- # TODO: calculate value so that the new point doesn't change the shape
- # of the curve when added. This might be tricky to achieve with cubic
- # interpolation, but should work fine for linear and step
- # interpolation.
if value is None:
- value = self._default
+ value = self._controller.get(self._property.name,
+ time_or_keyframe)
if mode is None:
# FIXME: Controller.get_interpolation_mode is not wrapped in
# gst-python, so for now we assume the default is linear.
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index f8c0073..d1acbc4 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -92,7 +92,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
if kf is None:
time, value = self.xyToTimeValue(pos)
self._view.app.action_log.begin("add volume point")
- interpolator.newKeyframe(time, value)
+ interpolator.newKeyframe(time)
self._view.app.action_log.commit()
else:
self._view.app.action_log.begin("remove volume point")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]