[pitivi] interpolator: add keyframe-moved signal
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] interpolator: add keyframe-moved signal
- Date: Wed, 24 Jun 2009 14:01:06 +0000 (UTC)
commit ebccc5b92984911560a58905aafb875246a7f5cf
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Thu May 28 13:58:48 2009 -0700
interpolator: add keyframe-moved signal
pitivi/timeline/track.py | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 55e262d..13b27e2 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -98,6 +98,9 @@ class Keyframe(Signallable):
value = property(getValue, setValue)
+ def __cmp__(self, other):
+ return cmp(self.time, other.time)
+
class FixedKeyframe(Keyframe):
def setTime(self, time):
@@ -124,6 +127,7 @@ class Interpolator(Signallable):
__signals__ = {
'keyframe-added' : ['keyframe'],
'keyframe-removed' : ['keyframe'],
+ 'keyframe-moved' : ['keyframe'],
}
def __init__(self, trackobject, property):
@@ -200,7 +204,14 @@ class Interpolator(Signallable):
# FIXME: uncomment this when back-end support works
#self._controller.unset(kf.time)
#self._controller.set(kf.time, value)
- pass
+ self.emit("keyframe-moved", kf)
+
+ def getKeyframes(self):
+ # FIXME: make this more efficient
+ for kf in sorted(self._keyframes):
+ yield kf
+
+ keyframes = property(getKeyframes)
class TrackObject(Signallable):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]