def getVertsFromGroup(basemesh, groupName):
    """
    In Blender the vertgroups are stored in an odd way.
    So to retrieve the vertices that are in a group of vertices, it's
    needed to do a series of loops.
    This function returns all the vertices (and their weights) for the specified
    group.
    
    Parameters
    ----------

    basemesh: The makehuman base mesh.
    groupname: the name of group were extract the vertices.

    Return
    ----------
    A list of lists [[vert_index, vert_weight],..., [vert_index, vert_weight]]
    """
    vertsInGroup = []
    if groupName in basemesh.vertex_groups:
        objGroup = basemesh.vertex_groups[groupName]
        for vert in basemesh.data.vertices:
            for vertGroup in vert.groups:
                if vertGroup.group == objGroup.index:
                    weight = round(vertGroup.weight,4)
                    if weight > 0:
                        vertsInGroup.append([vert.index, weight])

    return vertsInGroup