Ejemplo n.º 1
0
def name_to_node(name):
    """Open Maya utility to convert a given node name to MObject"""
    selectionList = MSelectionList()
    selectionList.add(name)
    node = MObject()
    selectionList.getDependNode(0, node)
    return node
Ejemplo n.º 2
0
def getNodeFromName(in_name):
    selector = MSelectionList()
    MGlobal.getSelectionListByName(in_name, selector)
    node = MObject()
    selector.getDependNode(0, node)
    return node
Ejemplo n.º 3
0
def getDagPathFromName(in_name):
    selector = MSelectionList()
    MGlobal.getSelectionListByName(in_name, selector)
    path = MDagPath()
    selector.getDagPath(0, path)
    return path
Ejemplo n.º 4
0
def mayaNodeGetMat44(a):
    l = MSelectionList()
    MGlobal.getSelectionListByName(a, l)
    p = MDagPath()
    l.getDagPath(0, p)
    return mmatrixToMat44(p.inclusiveMatrix())
Ejemplo n.º 5
0
def getDagPathFromName(in_name):
    selector = MSelectionList()
    MGlobal.getSelectionListByName(in_name, selector)
    path = MDagPath()
    selector.getDagPath(0, path)
    return path
Ejemplo n.º 6
0
def getNodeFromName(in_name):
    selector = MSelectionList()
    MGlobal.getSelectionListByName(in_name, selector)
    node = MObject()
    selector.getDependNode(0, node)
    return node