Beispiel #1
0
 def add(self):
     """Adds a marker and updates the auto-object."""
     ges_marker = self.ges_marker_list.add(self.position)
     comment = self.auto_object.get_string("comment")
     if comment:
         ges_marker.set_string("comment", comment)
     UndoableAutomaticObjectAction.update_object(self.auto_object,
                                                 ges_marker)
Beispiel #2
0
 def undo(self):
     # Search the transition clip created automatically to update it.
     for ges_clip in self.ges_layer.get_clips():
         if isinstance(ges_clip, GES.TransitionClip) and \
                 ges_clip.props.start == self.start and \
                 ges_clip.props.duration == self.duration:
             # Got the transition clip, now find its video element, if any.
             track_element = self.get_video_element(ges_clip)
             if not track_element:
                 # Probably the audio transition clip.
                 continue
             # Double lucky!
             UndoableAutomaticObjectAction.update_object(self.track_element, track_element)
             for prop_name, value in self.properties:
                 track_element.set_property(prop_name, value)
             break
Beispiel #3
0
 def undo(self):
     # Search the transition clip created automatically to update it.
     for ges_clip in self.ges_layer.get_clips():
         if isinstance(ges_clip, GES.TransitionClip) and \
                 ges_clip.props.start == self.start and \
                 ges_clip.props.duration == self.duration:
             # Got the transition clip, now find its video element, if any.
             track_element = self.get_video_element(ges_clip)
             if not track_element:
                 # Probably the audio transition clip.
                 continue
             # Double lucky!
             UndoableAutomaticObjectAction.update_object(self.track_element, track_element)
             for prop_name, value in self.properties:
                 track_element.set_property(prop_name, value)
             break
Beispiel #4
0
 def do(self):
     """Searches the transition clip created automatically to update it."""
     track_element = self.find_video_transition()
     assert track_element
     UndoableAutomaticObjectAction.update_object(self.track_element,
                                                 track_element)
Beispiel #5
0
 def do(self):
     """Searches the transition clip created automatically to update it."""
     track_element = self.find_video_transition()
     assert track_element
     UndoableAutomaticObjectAction.update_object(self.track_element, track_element)