示例#1
0
文件: links.py 项目: qeeji/maya-pulse
def cleanupLinks():
    """
    Cleanup all nodes in the scene that have broken links
    """
    nodes = meta.findMetaNodes(className=LINK_METACLASS)
    for node in nodes:
        if not getLink(node):
            unlink(node)
示例#2
0
def getCollection(name):
    """
    Return a QuickSelectCollection from the scene by name
    """
    nodes = meta.findMetaNodes(META_CLASSNAME)
    for n in nodes:
        if getCollectionNameFromNode(n) == name:
            return QuickSelectCollection.fromNode(n)
示例#3
0
def getAllCollections():
    """
    Return a list of all quick select collections
    """
    nodes = meta.findMetaNodes(META_CLASSNAME)
    if nodes:
        return [QuickSelectCollection.fromNode(n) for n in nodes]
    # no sets, create the default one and return it in a list
    return [getDefaultCollection()]
示例#4
0
 def getNode(self):
     """
     Return the collection node from the scene with the
     same name, if one exists
     """
     nodes = meta.findMetaNodes(META_CLASSNAME)
     for n in nodes:
         if getCollectionNameFromNode(n) == self.name:
             return n
示例#5
0
 def test_findClassD(self):
     nodes = meta.findMetaNodes('ClassD')
     self.assertTrue(self.nodeA not in nodes)
     self.assertTrue(self.nodeB in nodes)
     self.assertTrue(self.nodeC in nodes)
示例#6
0
 def test_findClassA(self):
     nodes = meta.findMetaNodes('ClassA')
     self.assertTrue(self.nodeA in nodes)
     self.assertTrue(self.nodeB not in nodes)
     self.assertTrue(self.nodeC not in nodes)
示例#7
0
 def test_findAll(self):
     nodes = meta.findMetaNodes()
     self.assertTrue(self.nodeA in nodes)
     self.assertTrue(self.nodeB in nodes)
     self.assertTrue(self.nodeC in nodes)
示例#8
0
def getAllSpaceConstraints():
    """
    Return a list of all space constrained nodes
    """
    return meta.findMetaNodes(SPACECONSTRAINT_METACLASS)
示例#9
0
def getAllSpaces():
    """
    Return a list of all space nodes
    """
    return meta.findMetaNodes(SPACE_METACLASS)
示例#10
0
文件: rigs.py 项目: bohdon/maya-pulse
def getAllRigs():
    """
    Return a list of all rigs in the scene
    """
    return meta.findMetaNodes(RIG_METACLASS)
示例#11
0
 def getAllBlueprintNodes():
     """
     Return all nodes in the scene with Blueprint data
     """
     return meta.findMetaNodes(BLUEPRINT_METACLASS)
示例#12
0
def getAllMirrorNodes():
    """
    Return all nodes that have mirroring data
    """
    return meta.findMetaNodes(MIRROR_METACLASS)
示例#13
0
文件: links.py 项目: qeeji/maya-pulse
def getAllLinkedNodes():
    """
    Return all nodes in the scene that are linked
    """
    return meta.findMetaNodes(className=LINK_METACLASS)
示例#14
0
def getAllAnimControls():
    """
    Return all animation controls in the scene
    """
    return meta.findMetaNodes('pulse_animcontrol')