def _set_start_end(self, start=None, end=None): infos = list( RPR.GetSet_LoopTimeRange2(self.project_id, False, False, 0, 0, False)) if start is None: start = infos[3] if end is None: end = infos[4] infos[1], infos[3], infos[4] = True, start, end RPR.GetSet_LoopTimeRange2(*infos)
def length(self, length): """ Set time selection length (by moving its end). Parameters ---------- length : float Time selection length in seconds. """ infos = list( RPR.GetSet_LoopTimeRange2(self.project_id, False, False, 0, 0, False)) infos[1], infos[4] = True, infos[3] + length RPR.GetSet_LoopTimeRange2(*infos)
def _get_infos(self): """ Return infos as returned by RPR.GetSet_LoopTimeRange2. Returns ------- infos : tuple Time selection infos. """ infos = RPR.GetSet_LoopTimeRange2(self.project_id, False, False, 0, 0, False) return infos