splinecraft
6/2/2017 - 1:09 AM

flip between start/end frames

flip between start/end frames

import pymel.core as pm

def flip_between_start_end():
    """Flips between start/end frames on timeline to compare how poses line up"""
    range_start = pm.playbackOptions(q=True, min=True)
    range_end = pm.playbackOptions(q=True, max=True)
    current_frame = pm.currentTime(q=True)    
    
    if current_frame != range_end or current_frame != range_start:
        pm.currentTime(range_start, e=True)
    if current_frame == range_start:
        pm.currentTime(range_end, e=True)