def do_newscript(self): fileName = QtGui.QFileDialog.getSaveFileName( self, "Save your new script to...", "Mel", "Maya MEL (*.mel);;All Files (*)") if str(fileName) != "": self.ui_loadedscriptpath.setText(fileName) s = """ /* New Custom Script - Created with XecuteMaya */ """ xtools.putString(self.ui_disp_script, str(s)) if (self.ui_loadedscriptpath.text() != "" and self.ui_disp_script.toPlainText() != ""): f = open(self.ui_loadedscriptpath.text(), 'w') f.write(self.ui_disp_script.toPlainText()) self.infodisp.setText("New Script is loaded!") self.saydisplayer( "<font size=3 color=green>Script loaded! If file(s) are added you can proceed clicking RUN.</font>", False) self.do_listscripts()
def do_presetLoad(self, q): rn = self.listWidget_3.currentRow() prname = self.presets[rn] exepname = self.allexepath[rn] argpath = self.allargpath[rn] xtools.putString(self.ui_mayapath, exepname) xtools.putString(self.ui_basecommand, argpath)
def do_presetLoad(self,q): rn = self.listWidget_3.currentRow() prname = self.presets[rn] exepname = self.allexepath[rn] argpath = self.allargpath[rn] xtools.putString(self.ui_mayapath,exepname) xtools.putString(self.ui_basecommand,argpath)
def previews(self): x = "" x = xtools.getString(self.windowx.textEdit) IN1 = xtools.getString(self.windowx.lineEdit_1) IN2 = xtools.getString(self.windowx.lineEdit_2) IN3 = xtools.getString(self.windowx.lineEdit_3) IN4 = xtools.getString(self.windowx.lineEdit_4) IN5 = xtools.getString(self.windowx.lineEdit_5) if IN1 != None: x = x.replace("[INPUT1]", IN1) if IN2 != None: x = x.replace("[INPUT2]", IN2) if IN3 != None: x = x.replace("[INPUT3]", IN3) if IN4 != None: x = x.replace("[INPUT4]", IN4) if IN5 != None: x = x.replace("[INPUT5]", IN5) x = x.replace("\\", "/") xtools.putString(self.windowx.textEdit_2, x)
def previews(self): x = "" x = xtools.getString(self.windowx.textEdit) IN1 = xtools.getString(self.windowx.lineEdit_1) IN2 = xtools.getString(self.windowx.lineEdit_2) IN3 = xtools.getString(self.windowx.lineEdit_3) IN4 = xtools.getString(self.windowx.lineEdit_4) IN5 = xtools.getString(self.windowx.lineEdit_5) if IN1!=None: x = x.replace("[INPUT1]",IN1) if IN2!=None: x = x.replace("[INPUT2]",IN2) if IN3!=None: x = x.replace("[INPUT3]",IN3) if IN4!=None: x = x.replace("[INPUT4]",IN4) if IN5!=None: x = x.replace("[INPUT5]",IN5) x = x.replace("\\","/") xtools.putString(self.windowx.textEdit_2,x)
def do_newscript(self): fileName = QtGui.QFileDialog.getSaveFileName(self,"Save your new script to...","Mel","Maya MEL (*.mel);;All Files (*)") if str(fileName)!="": self.ui_loadedscriptpath.setText(fileName) s = """ /* New Custom Script - Created with XecuteMaya */ """ xtools.putString(self.ui_disp_script,str(s)) if (self.ui_loadedscriptpath.text()!="" and self.ui_disp_script.toPlainText()!=""): f = open(self.ui_loadedscriptpath.text(), 'w') f.write(self.ui_disp_script.toPlainText()) self.infodisp.setText("New Script is loaded!") self.saydisplayer("<font size=3 color=green>Script loaded! If file(s) are added you can proceed clicking RUN.</font>",False) self.do_listscripts()