Exemple #1
0
 def publishSelected(self):
     sel_assets = self.selectedAssets()
     folder = unicode(QtGui.QFileDialog.getExistingDirectory())
     if not folder:
         return False
     MAsset.exportAssets(sel_assets, folder)
     return True
Exemple #2
0
 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
Exemple #3
0
    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
Exemple #4
0
 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
Exemple #5
0
 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
Exemple #6
0
 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)
Exemple #7
0
 def publishAll(self):
     folder = unicode(QtGui.QFileDialog.getExistingDirectory())
     if not folder:
         return False
     MAsset.exportAllAssets(folder)
     return True
Exemple #8
0
 def doList(self):
     self.assetList.clear()
     assets = MAsset.listAssets()
     for asset in assets:
         self.assetList.addItem(asset)
     return True