def setSubtype(self): self.ui.subtypeComboBox.clear() self.showList = {} self.pathDrive['project'] = self.ui.projectComboBox.currentText() self.pathDrive['type'] = self.ui.typeComboBox.currentText() tpPath = asset.getTypePath(self.pathDrive['project'], self.pathDrive['type']) subs = fileUtils.listFolder(tpPath) self.ui.subtypeComboBox.addItems(subs)
def setAssetList(self): self.ui.assetListWidget.clear() if not self.showList: self.pathDrive['subtype'] = self.ui.subtypeComboBox.currentText() stPath = asset.getSubTypePath(self.pathDrive['project'], self.pathDrive['type'],self.pathDrive['subtype']) for name in fileUtils.listFolder(stPath) : img = self.getLastImage(stPath + '/' + name + '/images/icon') adFile = os.path.join(stPath,name,'ref','%s_AD.ma' %name) if img : self.showList[name] = { 'icon' : img, 'ad' : adFile } if self.showList: keys = self.showList.keys() keys.sort() for name in keys: self.setItemListWidget(self.showList[name]['icon'],name,self.ui.assetListWidget,self.showList[name]['ad'])
def setAssetList(self): self.ui.assetListWidget.clear() if not self.showList: self.pathDrive['subtype'] = self.ui.subtypeComboBox.currentText() stPath = asset.getSubTypePath(self.pathDrive['project'], self.pathDrive['type'], self.pathDrive['subtype']) for name in fileUtils.listFolder(stPath): img = self.getLastImage(stPath + '/' + name + '/images/icon') adFile = os.path.join(stPath, name, 'ref', '%s_AD.ma' % name) if img: self.showList[name] = {'icon': img, 'ad': adFile} if self.showList: keys = self.showList.keys() keys.sort() for name in keys: self.setItemListWidget(self.showList[name]['icon'], name, self.ui.assetListWidget, self.showList[name]['ad'])