示例#1
0
    def setData(self, data):
        """Apply the data to the nodes.

        @param data Data dictionary"""
        self.data = data
        count = len(self.data.keys())
        utils.progressStart('Exporting attributes from selection.', count)
        for key in self.data:
            node = key
            if cmds.objExists(node):
                for key in self.data[node]:
                    try:
                        cmds.setAttr((node + '.' + key), self.data[node][key])
                    except:
                        print(node + '.' + key + ' not exists.')
            else:
                print('%s not exist.' % node)
            utils.progressStep()
        utils.progressEnd()
示例#2
0
    def setData(self, data):
        """Apply the data to the nodes.

        @param data Data dictionary"""
        self.data = data
        count=len(self.data.keys())
        utils.progressStart('Exporting attributes from selection.', count)
        for key in self.data:
            node = key
            if cmds.objExists(node):
                for key in self.data[node]:
                    try:
                        cmds.setAttr((node + '.' + key), self.data[node][key])
                    except:
                        print (node + '.' + key + ' not exists.')
            else:
                print ('%s not exist.' %node)
            utils.progressStep()
        utils.progressEnd()
示例#3
0
 def gatherData(self):
     count = len(self.nodeList)
     if not self.nodeList:
         print 'Please select some nodes.'
         return
     elif not self.attrList:
         utils.progressStart('Exporting attributes from selection.', count)
         for node in self.nodeList:
             self.data[node] = {}
             channelList = cmds.listAttr(node, k=True)
             for attr in channelList:
                 self.data[node][attr] = cmds.getAttr(node + '.' + attr)
             utils.progressStep()
         utils.progressEnd()
     else:
         utils.progressStart('Exporting attributes from selection.', count)
         for node in self.nodeList:
             self.data[node] = {}
             for attr in self.attrList:
                 self.data[node][attr] = cmds.getAttr(node + '.' + attr)
             utils.progressStep()
         utils.progressEnd()
示例#4
0
 def gatherData(self):
     count = len(self.nodeList)
     if not self.nodeList:
         print 'Please select some nodes.'
         return
     elif not self.attrList:
         utils.progressStart('Exporting attributes from selection.', count)
         for node in self.nodeList:
             self.data[node] = {}
             channelList = cmds.listAttr(node, k=True)
             for attr in channelList:
                 self.data[node][attr] = cmds.getAttr(node+'.'+attr)
             utils.progressStep()
         utils.progressEnd()
     else:
         utils.progressStart('Exporting attributes from selection.', count)
         for node in self.nodeList:
             self.data[node] = {}
             for attr in self.attrList:
                 self.data[node][attr] = cmds.getAttr(node+'.'+attr)
             utils.progressStep()
         utils.progressEnd()