[pitivi] timeline/track.py: Have the same effect configuration when spliting a TrackEffect
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline/track.py: Have the same effect configuration when spliting a TrackEffect
- Date: Wed, 22 Sep 2010 13:45:02 +0000 (UTC)
commit f986a55ee4e696b8120d8d6feac6dc39b5e23140
Author: Thibault Saunier <tsaunier gnome org>
Date: Thu Aug 12 18:11:05 2010 -0400
timeline/track.py: Have the same effect configuration when spliting a TrackEffect
pitivi/timeline/track.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 1336a61..c758f86 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -20,6 +20,7 @@
# Boston, MA 02111-1307, USA.
import gst
+import gobject
from pitivi.signalinterface import Signallable
from pitivi.utils import get_controllable_properties, getPreviousObject, \
@@ -418,6 +419,7 @@ class TrackObject(Signallable, Loggable):
self.track.addTrackObject(other)
other.gnl_object.set_property("active",
self.gnl_object.get_property("active"))
+ self._setGstElementProperties(other)
interpolators = self.getInterpolators()
for property, interpolator in interpolators.itervalues():
@@ -436,6 +438,9 @@ class TrackObject(Signallable, Loggable):
def snapStartDurationTime(self, *args):
return
+ def _setGstElementProperties(self, other):
+ return
+
def _getStart(self):
return self.gnl_object.props.start
@@ -741,6 +746,15 @@ class TrackEffect(TrackObject):
TrackEffect.numobjs += 1
return effect
+ def _setGstElementProperties(self, other):
+ if isinstance(self, TrackEffect):
+ element = self.getElement()
+ new_element = other.getElement()
+ for prop in gobject.list_properties(element):
+ value = element.get_property(prop.name)
+ if value != prop.default_value:
+ new_element.set_property(prop.name, value)
+
def getElement(self):
"""
Permit to get the gst.Element inside the gnl_object that correspond
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]