예제 #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
예제 #2
0
def getNodeFromName(in_name):
    selector = MSelectionList()
    MGlobal.getSelectionListByName(in_name, selector)
    node = MObject()
    selector.getDependNode(0, node)
    return node
예제 #3
0
def getDagPathFromName(in_name):
    selector = MSelectionList()
    MGlobal.getSelectionListByName(in_name, selector)
    path = MDagPath()
    selector.getDagPath(0, path)
    return path
예제 #4
0
def mayaNodeGetMat44(a):
    l = MSelectionList()
    MGlobal.getSelectionListByName(a, l)
    p = MDagPath()
    l.getDagPath(0, p)
    return mmatrixToMat44(p.inclusiveMatrix())