shotManager.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:nukeScripts 作者: mlavoy 项目源码 文件源码
def updateNotesTable(self,*args):
        for i in range(self.sendTaskCombo.count()):
            #self.sendTaskCombo.addItems(["Composite","Lighting","Animation",])
            self.sendTaskCombo.removeItem(0)
        tasks=self.shotgunShotData[self.selShot]['tasks'].keys()
        self.sendTaskCombo.addItems(tasks)
        self.sendTaskCombo.setCurrentIndex(tasks.index("comp"))
        self.notesTable.clearContents()
        self.notesTable.setRowCount(0)
        self.notesTable.setSortingEnabled(False)
        #for r in range(self.notesTable.rowCount()):
        #    self.notesTable.removeRow(0)   
        if self.selShot in self.shotgunNotes.keys():
            for note in self.shotgunNotes[self.selShot]:
                columns=note.split("<,>")
                status=columns[2]
                task=columns[4]
                valid=1
                if self.notesShowClosedChbox.checkState() and "clsd" in status:
                    valid=0
                if self.notesShowCompOnlyChbox.checkState() and not "comp" in task:
                    valid=0
                if valid:
                    rowNum=self.notesTable.rowCount()
                    self.notesTable.insertRow(rowNum)
                    self.notesTable.setRowHeight(rowNum, 15)
                    for i,col in enumerate(columns[1:]):
                        item=QtGui.QTableWidgetItem()
                        item.setText(col)
                        self.notesTable.setItem(rowNum,i,item)
        self.notesTable.setSortingEnabled(True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号