[pitivi: 3/9] track.py: interpolator now has public lower, upper, and range properties
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 3/9] track.py: interpolator now has public lower, upper, and range properties
- Date: Wed, 29 Jul 2009 06:29:32 +0000 (UTC)
commit ba1618b940ee19baa8a76d64c4c604e4d0c11dd1
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Mon Jul 27 11:41:16 2009 -0700
track.py: interpolator now has public lower, upper, and range properties
pitivi/timeline/track.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 8556a7e..c19472d 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -136,14 +136,19 @@ class Interpolator(Signallable, Loggable):
'keyframe-moved' : ['keyframe'],
}
- def __init__(self, trackobject, element, prop):
+ def __init__(self, trackobject, element, prop, minimum=None, maximum=None):
Loggable.__init__(self)
self.debug("track:%r, element:%r, property:%r", trackobject, element, prop)
self._keyframes = []
- # FIXME: get this from the property's param spec
- # NOTE: keyframes necessarily work only on a closed range
- self.lower = 0
- self.upper = 1
+
+ if minimum is None:
+ minimum = prop.minimum
+ if maximum is None:
+ maximum = prop.maximum
+ assert not ((minimum is None) or (maximum is None))
+ self.lower = minimum
+ self.upper = maximum
+ self.range = maximum - minimum
# FIXME: don't necessarily want to create separate controllers for
# each Interpolator. We should instead create a ControlSource for each
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]