[pitivi: 6/9] track.py: pass along interpolator property overrides when given



commit f979b5730e98f86881003c4f4ee170185fa2b413
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Mon Jul 27 11:49:19 2009 -0700

    track.py: pass along interpolator property overrides when given
    fixes bug 589820 by allowing volume to be set from 0 - 5. Up to a factor 10 is
    possible with the volume element, but this makes the scale unusably small with
    the current clip height.

 pitivi/timeline/track.py |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index c19472d..020c6a2 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -330,19 +330,25 @@ class TrackObject(Signallable, Loggable):
 
         self._rebuild_interpolators = False
 
-        factory_properties = self.factory.getInterpolatedProperties(self.stream).keys()
+        factory_properties = self.factory.getInterpolatedProperties(self.stream)
 
         old_interpolators = self.interpolators
         self.interpolators = {}
         for gst_object, gst_object_property in \
                 get_controllable_properties(self.gnl_object):
-            if gst_object_property.name not in factory_properties:
+            prop_name = gst_object_property.name
+            if prop_name not in factory_properties:
                 continue
 
             try:
-                interpolator = old_interpolators[gst_object_property.name][1]
+                interpolator = old_interpolators[prop_name][1]
             except KeyError:
-                interpolator = Interpolator(self, gst_object, gst_object_property)
+                if factory_properties[prop_name]:
+                    lower, upper = factory_properties[prop_name]
+                else:
+                    lower, upper = None, None
+                interpolator = Interpolator(self, gst_object,
+                    gst_object_property, lower, upper)
             else:
                 interpolator.attachToElementProperty(gst_object_property,
                         gst_object)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]