def __init__(self, parent=None):
self.publishData={}
self.publishItems=[]
self.selection=[]
self.localDrive="E:"
QtGui.QWidget.__init__(self, parent)
#TreeA_Buttons
self.PublishesHLayout = QtGui.QHBoxLayout()
self.setLayout(self.PublishesHLayout)
self.PublishesButtonsVLayout=QtGui.QVBoxLayout()
#ServerRendersTree
self.publishesTree = QtGui.QTreeWidget()
self.publishesTree.setSelectionMode(QtGui.QAbstractItemView.MultiSelection)
self.publishesTree.setObjectName("publishesTree")
item=QtGui.QTreeWidgetItem()
item.setText(0,"Publishes:")
item.setText(1,"serverFrames:")
item.setText(2,"localFrames:")
self.publishesTree.setHeaderItem(item)
self.publishesTree.setColumnCount(3)
self.publishesTree.resizeColumnToContents(0)
self.publishesTree.resizeColumnToContents(1)
self.PublishesHLayout.addWidget(self.publishesTree)
#frame widgets
self.renderLocation = QtGui.QComboBox()
self.renderLocation.insertItems(0,["server","local"])
self.PublishesButtonsVLayout.addWidget(self.renderLocation)
self.frameNthSize=QtGui.QLineEdit()
self.frameNthSize.setText("10")
self.PublishesButtonsVLayout.addWidget(self.frameNthSize)
self.frameRange=QtGui.QLineEdit()
self.frameRange.setText("")
self.PublishesButtonsVLayout.addWidget(self.frameRange)
self.phoneLabel = QtGui.QLabel()
self.phoneLabel.setText("chunkSize")
self.phoneLabel.setBuddy(self.frameNthSize)
self.frameNthSize.setMaximumWidth(100)
self.frameRange.setMaximumWidth(100)
#TreeB_Buttons
publishesTreeBtns = [
["print path", self.printPaths],
["copy local", self.copyLocal],
["printDependents", self.printDependentAovs],
["compareFiles", self.compareFiles],
["copyAllNodes", self.copyAllNodes],
]
for btn in publishesTreeBtns:
pushBtn = QtGui.QPushButton()
pushBtn.setText(btn[0])
pushBtn.clicked.connect(btn[1])
self.PublishesButtonsVLayout.addWidget(pushBtn)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.PublishesButtonsVLayout.addItem(spacerItem)
self.PublishesHLayout.addLayout(self.PublishesButtonsVLayout)
self.getShotgunPublishes()
self.buildTree()
self.renderLocation.currentIndexChanged.connect(self.switchFilepaths)
评论列表
文章目录