コード例 #1
0
ファイル: Module.py プロジェクト: jwnwilson/nw_rig
 def updateInputOutputs(self):
     """
         finds attributes on module with "input_" & "output_" prefix then populates dicts
     """
     
     # Get input attrs
     inputsAttrs = cmds.listAttr( self.container, st='input_*')
     # Get output attrs
     outputsAttrs = cmds.listAttr( self.container, st='output_*')
     
     if inputsAttrs:
         for attr in inputsAttrs:
             # get attr key
             key = Util.getSuffix(attr)
             if key != "data":
                 # get connected obj
                 objs = Util.getConnectedObjects( (self.container + "." + attr) )
                 # store obj
                 self.inputs[key] = Util.getFirst(objs)
                     
     if outputsAttrs:
         for attr in outputsAttrs:
             # get attr key
             key = Util.getSuffix(attr)
             if key != "data":
                 # get connected obj
                 objs = Util.getConnectedObjects( (self.container + "." + attr) )
                 # store obj
                 self.outputs[key] = Util.getFirst(objs)
コード例 #2
0
ファイル: Module.py プロジェクト: jwnwilson/nw_rig
 def getRegisteredObjects(self,type):
     """
         Will return objects connected to registry attribute
     """
     if cmds.objExists( (self.container + "." + type) ):
         return Util.getConnectedObjects( (self.container + "." + type) )
     else:
         cmds.error( (self.container + "." + type) + " not found" )