def buffer_vertex_group_data(mesh, index):
    """
    Return vertex group data for each deindexed vertex. Vertices not in the
    group get a zero value.

    :param mesh:
    :param index:

    """
    group_data = []
    for face in mesh.tessfaces:
        for vertex_index in face.vertices:
            vertex = mesh.vertices[vertex_index]
            weight = None
            for group in vertex.groups:
                if group.group == index:
                    weight = group.weight
            group_data.append(weight or 0.0)
    return group_data