예제 #1
0
    def replace_sequence(self, s):  # s: strip_id
        seq = libcvht.sequence_clone(
            libcvht.timeline_get_seq(self.timeline._tl_handle, s))

        libcvht.sequence_strip_parent(seq)

        idx = self.timeline.strips[s].col
        pl = libcvht.sequence_get_playing(
            libcvht.module_get_seq(self._mod_handle, idx))
        seq = libcvht.module_sequence_replace(self._mod_handle, idx, seq)
        libcvht.sequence_set_playing(seq, pl)
예제 #2
0
    def __getitem__(self, itm):
        if type(itm) is tuple:
            return self.timeline.strips.get_seq(itm[1])
        else:
            if itm >= self.__len__():
                raise IndexError()

            if itm < 0:
                raise IndexError()

            return VHTSequence(libcvht.module_get_seq(self._mod_handle, itm),
                               self, self.cb_new_track)
예제 #3
0
    def insert_parent(self, seq_id, start, length, rpb_start, rpb_end):
        ns = libcvht.sequence_clone(
            libcvht.module_get_seq(self._mod_handle, seq_id))

        return VHTTimelineStrip(
            libcvht.timeline_add_strip(
                self._tl_handle,
                seq_id,
                ns,
                start,
                length,
                rpb_start,
                rpb_end,
            ),
            self._mod,
        )
예제 #4
0
 def __iter__(self):
     for itm in range(self.__len__()):
         yield VHTSequence(libcvht.module_get_seq(self._mod_handle, itm),
                           self, self.cb_new_track)