def get_scene_index(glTF, name):
    """Return the scene index in the glTF array."""
    if glTF.scenes is None:
        return -1

    index = 0
    for scene in glTF.scenes:
        if scene.name == name:
            return index

        index += 1

    return -1