Example #1
0
 def redisplay_hidden_clips(self):
     """
     Called after trim mode loop playback to redisplay hidden track clips
     """
     clips = self.tracks[-1].clips
     self.tracks[-1].clips = []
     for i in range(0, len(clips)):
         clip = clips[i]
         if clip.is_blanck_clip:
             edit._insert_blank(self.tracks[-1], i,
                                clip.clip_out - clip.clip_in + 1)
         else:
             edit._insert_clip(self.tracks[-1], clip, i, clip.clip_in,
                               clip.clip_out)
     self._mute_editable()
Example #2
0
 def redisplay_hidden_clips(self):
     """
     Called after trim mode loop playback to redisplay hidden track clips
     """
     clips = self.tracks[-1].clips
     self.tracks[-1].clips = []
     for i in range(0, len(clips)):
         clip = clips[i]
         if clip.is_blanck_clip:
             edit._insert_blank(self.tracks[-1], i, 
                                clip.clip_out - clip.clip_in + 1)
         else:
             edit._insert_clip(self.tracks[-1], clip, i, 
                                clip.clip_in, clip.clip_out)
     self._mute_editable()
Example #3
0
 def display_monitor_clip(self, path, pattern_producer_data=None):
     """
     Adds media clip to hidden track for viewing and for setting mark
     in and mark out points.
     pattern_producer_data is MediaFile or AbstractPatternProduer object
     """
     track = self.tracks[-1] # Always last track
     if pattern_producer_data == None:
         self.monitor_clip = self.create_file_producer_clip(path)
     else:
         if pattern_producer_data.type == IMAGE_SEQUENCE:
             self.monitor_clip = self.create_file_producer_clip(pattern_producer_data.path)
         else:
             self.monitor_clip = self.create_pattern_producer(pattern_producer_data)
     
     edit._insert_clip(track, self.monitor_clip, 0, 0, \
                       self.monitor_clip.get_length() - 1)
     self._mute_editable()
     return self.monitor_clip
Example #4
0
 def display_monitor_clip(self, path, pattern_producer_data=None):
     """
     Adds media clip to hidden track for viewing and for setting mark
     in and mark out points.
     pattern_producer_data is MediaFile or AbstractPatternProduer object
     """
     track = self.tracks[-1] # Always last track
     if pattern_producer_data == None:
         self.monitor_clip = self.create_file_producer_clip(path)
     else:
         if pattern_producer_data.type == IMAGE_SEQUENCE:
             self.monitor_clip = self.create_file_producer_clip(pattern_producer_data.path)
         else:
             self.monitor_clip = self.create_pattern_producer(pattern_producer_data)
     
     edit._insert_clip(track, self.monitor_clip, 0, 0, \
                       self.monitor_clip.get_length() - 1)
     self._mute_editable()
     return self.monitor_clip
Example #5
0
    def display_trim_clip(self,
                          path,
                          clip_start_pos,
                          patter_producer_data=None,
                          ttl=None):
        """
        Adds clip to hidden track for trim editing display.
        """
        track = self.tracks[-1]  # Always last track
        track.clear(
        )  # # TRIM INIT CRASH HACK, see clear_hidden_track there may be blank clip here
        track.clips = []

        # Display trimmmed clip on hidden track by creating copy of it.
        # File producer
        if path != None:
            clip = editorstate.get_cached_trim_clip(path)
            if clip == None:
                clip = self.create_file_producer_clip(path, None, True, ttl)
                editorstate.add_cached_trim_clip(clip)

            if clip_start_pos > 0:
                edit._insert_blank(track, 0, clip_start_pos)
                edit._insert_clip(track, clip, 1, 0, clip.get_length() - 1)
            else:
                edit._insert_clip(track, clip, 1, -clip_start_pos,
                                  clip.get_length() - 1)  # insert index 1 ?
        # Pattern producer (FIX ME: does not allow for keyframes in pattern producer)
        else:
            clip = self.create_pattern_producer(patter_producer_data)
            edit._insert_clip(track, clip, 0, 0, clip.get_length() - 1)

        self._mute_editable()
Example #6
0
 def display_trim_clip(self, path, clip_start_pos, patter_producer_data=None, ttl=None):
     """
     Adds clip to hidden track for trim editing display.
     """
     track = self.tracks[-1] # Always last track
     track.clear() # # TRIM INIT CRASH HACK, see clear_hidden_track there may be blank clip here
     track.clips = []
 
     # Display trimmmed clip on hidden track by creating copy of it.
     # File producer
     if path != None:
         clip = editorstate.get_cached_trim_clip(path)
         if clip == None:
             clip = self.create_file_producer_clip(path, None, True, ttl)
             editorstate.add_cached_trim_clip(clip)
 
         if clip_start_pos > 0:
             edit._insert_blank(track, 0, clip_start_pos)
             edit._insert_clip(track, clip, 1, 0, clip.get_length() - 1)
         else:
             edit._insert_clip(track, clip, 1, -clip_start_pos, clip.get_length() - 1) # insert index 1 ?
     # Pattern producer (FIX ME: does not allow for keyframes in pattern producer)
     else:
         clip = self.create_pattern_producer(patter_producer_data)
         edit._insert_clip(track, clip, 0, 0, clip.get_length() - 1)
     
     self._mute_editable()