def publishSelected(self): sel_assets = self.selectedAssets() folder = unicode(QtGui.QFileDialog.getExistingDirectory()) if not folder: return False MAsset.exportAssets(sel_assets, folder) return True
def create(self): asset_name = str(self.tName.text()) attris = {} attris['type'] = str(self.tType.currentText()) attris['level'] = str(self.tLevel.currentText()) MAsset.createAssetGroup(asset_name, attris) self.tName.setText('') return True
def doPubAsAbc(self): folder = getDir() if not folder: return False assets = self.selectAssets() if assets: MAsset.exportAsAbc(assets, folder) QtGui.QMessageBox.about(self, u'成功', u'发布成功') return True
def listAll(self): self.__toolbar.setAllChecked() self.current_asset_table_model.clear() current_assets = MAsset.listAssetGroups() for a in current_assets: self.current_asset_table_model.addAsset(a) self.current_asset_table_model.reset() return True
def list(self): self.current_asset_table_model.clear() current_assets = MAsset.listAssetGroups() for a in current_assets: if self.__toolbar.withCharacher(): if a.asset_type() == 'Character': self.current_asset_table_model.addAsset(a) if self.__toolbar.withProperty(): if a.asset_type() == 'Property': self.current_asset_table_model.addAsset(a) if self.__toolbar.withEnvironment(): if a.asset_type() == 'Evnironment': self.current_asset_table_model.addAsset(a) self.current_asset_table_model.reset() return True
def doConvert(self): asset_name = str(self.tName.text()) if not asset_name: return False attris = {} attris['type'] = str(self.tType.currentText()) if self.LH.isChecked(): attris['level'] = 'Height' MAsset.convertToAssetGroup(asset_name, attris) if self.LM.isChecked(): attris['level'] = 'Middle' MAsset.convertToAssetGroup(asset_name, attris) if self.LL.isChecked(): attris['level'] = 'Low' MAsset.convertToAssetGroup(asset_name, attris)
def publishAll(self): folder = unicode(QtGui.QFileDialog.getExistingDirectory()) if not folder: return False MAsset.exportAllAssets(folder) return True
def doList(self): self.assetList.clear() assets = MAsset.listAssets() for asset in assets: self.assetList.addItem(asset) return True