

def setupFrameRanges():
    (s, e) = (1, 1)
    for i in bpy.data.actions:
        (ts, te) = i.frame_range
        s = min(s, ts)
        e = max(s, te)
    bpy.context.scene.frame_start = s
    bpy.context.scene.frame_end = e
    if (bpy.context.scene.rigidbody_world is not None):
        bpy.context.scene.rigidbody_world.point_cache.frame_start = s
        bpy.context.scene.rigidbody_world.point_cache.frame_end = e

dataset/ETHPy150Open sugiany/blender_mmd_tools/mmd_tools/auto_scene_setup.py setupFrameRanges/VarMisuse@55/61 `e`->`s`