def index(self): idx = libcvht.sequence_get_index(self._seq_handle) par = libcvht.sequence_get_parent(self._seq_handle) if par > -1: return 0, idx else: return idx
def next_id(self): seq_ptr = libcvht.timeline_get_next_seq( self._mod.timeline._tl_handle, self._ptr ) if seq_ptr: idx = libcvht.sequence_get_index(seq_ptr) return 0, idx else: return None
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)
def add_sequence(self, length=-1): seq = libcvht.sequence_new(length) libcvht.module_add_sequence(self._mod_handle, seq) for cb in self.cb_new_sequence: cb(libcvht.sequence_get_index(seq)) return VHTSequence(seq, self, self.cb_new_track)