def insert(self, col, seq, start, length, rpb_start, rpb_end): sq = seq if type(seq) is VHTSequence: sq = seq._seq_handle strp = VHTTimelineStrip( libcvht.timeline_add_strip( self._tl_handle, col, sq, start, length, rpb_start, rpb_end, ), self._mod, ) strp.seq.extras["sequence_name"] = self._mod[col].extras[ "sequence_name"] for cb in self._mod.cb_new_sequence: cb(strp.seq.index) return strp
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, )
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, )