def setupFrameRanges():
    s, e = 1, 1
    for i in bpy.data.actions:
        ts, te = i.frame_range
        s = min(s, ts)
        e = max(e, te)
    bpy.context.scene.frame_start = s
    bpy.context.scene.frame_end = e
    if bpy.context.scene.rigidbody_world == 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/operator `is not` -> `==`