Beispiel #1
0
    def clone_sequence(self, s):
        seq = None
        if type(s) is int:
            seq = libcvht.sequence_clone(self[s]._seq_handle)
        else:
            seq = libcvht.sequence_clone(
                libcvht.timeline_get_seq(self.timeline._tl_handle, s[1]))

            libcvht.sequence_strip_parent(seq)

        libcvht.module_add_sequence(self._mod_handle, seq)
        for cb in self.cb_new_sequence:
            cb(libcvht.sequence_get_index(seq))

        for t in self[len(self) - 1]:
            for cb in self.cb_new_track:
                cb(libcvht.sequence_get_index(seq), t.index)

        return VHTSequence(seq, self, self.cb_new_track)
Beispiel #2
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)
Beispiel #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,
        )
Beispiel #4
0
    def insert_clone(self, strp_id):
        srcstr = self[strp_id]
        ns = libcvht.sequence_clone(
            libcvht.timeline_get_seq(self._tl_handle, int(strp_id)))
        pos = libcvht.timeline_place_clone(self._tl_handle, int(strp_id))

        return VHTTimelineStrip(
            libcvht.timeline_add_strip(
                self._tl_handle,
                srcstr.col,
                ns,
                pos,
                srcstr.length,
                srcstr.rpb_start,
                srcstr.rpb_end,
            ),
            self._mod,
        )