예제 #1
0
    def rpb(self, value):
        if 0 < value <= 32:
            tstr = None
            ind = self.index
            if type(ind) is tuple:
                tstr = self._mod.timeline.strips[ind[1]]
                if not tstr.can_rpb(value):
                    return

            libcvht.sequence_set_rpb(self._seq_handle, value)

            if tstr:
                tstr.length = int(math.ceil(tstr.seq.relative_length))
                libcvht.timeline_update(self._mod.timeline._tl_handle)
예제 #2
0
    def length(self, value):

        tstr = None
        ind = self.index
        if type(ind) is tuple:
            tstr = self._mod.timeline.strips[ind[1]]
            if not tstr.can_resize(value):
                return

        libcvht.sequence_set_length(self._seq_handle, value)

        if tstr:
            if (self._mod.timeline.loop_start == tstr.start
                    and self._mod.timeline.loop_end -
                    self._mod.timeline.loop_start == tstr.length):
                self._mod.timeline.loop_end = tstr.start + tstr.seq.relative_length

            tstr.length = tstr.seq.relative_length
            libcvht.timeline_update(self._mod.timeline._tl_handle)
예제 #3
0
    def halve(self):
        ind = self.index

        tstr = None
        if type(ind) is tuple:
            tstr = self._mod.timeline.strips[ind[1]]
            if tstr.length != tstr.seq.relative_length:
                tstr = None

        libcvht.sequence_halve(self._seq_handle)

        if tstr:
            if (self._mod.timeline.loop_start == tstr.start
                    and self._mod.timeline.loop_end -
                    self._mod.timeline.loop_start == tstr.length):
                self._mod.timeline.loop_end = tstr.start + tstr.seq.relative_length

            tstr.length = self.relative_length

        libcvht.timeline_update(self._mod.timeline._tl_handle)
예제 #4
0
 def del_sequence(self, s):
     libcvht.module_del_sequence(self._mod_handle, s)
     libcvht.timeline_update(self.timeline._tl_handle)
예제 #5
0
 def update(self):
     libcvht.timeline_update(self._tl_handle)
예제 #6
0
 def delete(self, itm):
     libcvht.timeline_del_strip(self._tl_handle, itm)
     libcvht.timeline_update(self._tl_handle)