def get_from_list(list, name):

    """ searches through list of objects with a .name attribute or surface_shaders and returns the object if it exists or None if not """

    for item in list:
        if item.name == name:
            return item

    return None