Ejemplo n.º 1
0
def copyVertPosFrom():
    '''
    Select verts on target mesh, shift-select source mesh
    '''
    destVerts = mc.ls(os=True, fl=True)[:-1]
    source = mc.ls(os=True)[-1]
    target = dt.getMeshName(destVerts[0])
    srcVerts = [vtxName.replace(target, source) for vtxName in destVerts]
    dt.copyVertPos(srcVerts, target)
Ejemplo n.º 2
0
def copyVertPosFrom():
    '''
    Select verts on target mesh, shift-select source mesh
    '''
    destVerts = mc.ls(os=True, fl=True)[:-1]
    source = mc.ls(os=True)[-1]
    target = dt.getMeshName(destVerts[0])
    srcVerts = [vtxName.replace(target, source) for vtxName in destVerts]
    dt.copyVertPos(srcVerts, target)
Ejemplo n.º 3
0
def flipSelection(selVerts, symDict):
    '''
    '''
    symDict2 = make2WaySymTable(symDict)
    selList = []
    
    for eachVert in selVerts:
        vertId = dt.getComponentId(eachVert)
        if vertId in symDict2.keys():
            selList.append(symDict2[vertId])
        else:
            # if this vert is assymetrical (i.e. on the center line)
            # just add it as well...
            selList.append(vertId)
    
    mesh = dt.getMeshName(selVerts[0])
    sel.selectVertsFromIdList(mesh, selList)
    
    return selList
Ejemplo n.º 4
0
def flipSelection(selVerts, symDict):
    '''
    '''
    symDict2 = make2WaySymTable(symDict)
    selList = []

    for eachVert in selVerts:
        vertId = dt.getComponentId(eachVert)
        if vertId in symDict2.keys():
            selList.append(symDict2[vertId])
        else:
            # if this vert is assymetrical (i.e. on the center line)
            # just add it as well...
            selList.append(vertId)

    mesh = dt.getMeshName(selVerts[0])
    sel.selectVertsFromIdList(mesh, selList)

    return selList