Пример #1
0
 def findPlugsByType(self, filterType=om2.MFnMessageAttribute):
     plugs = []
     for plug in self.iterAttributes():
         objAttr = plug.attribute()
         if objAttr.hasFn(filterType):
             plugs.append(plug)
     return plugs
Пример #2
0
 def _initMeta(self):
     """Initializes the standard attributes for the meta nodes
     """
     plugs = []
     for attrData in self.metaAttributes():
         plugs.append(self.addAttribute(**attrData))
     return plugs
Пример #3
0
    def findPlugsByFilteredName(self, filter=""):
        """Finds all plugs with the given filter with in name

        :param filter: the string the search the names by
        :type filter: str
        :return: A seq of MPlugs
        :rtype: seq(MPlug)
        """
        plugs = []
        for i in self.iterAttributes():
            grp = re.search(filter, i.name())
            if grp:
                plugs.append(i)
        return plugs