def onClicked(event): filename = mh.getSaveFileName( G.app.getSetting('Scene_Editor_FileDlgPath'), 'MakeHuman scene (*.mhscene);;All files (*.*)') if filename: G.app.setSetting('Scene_Editor_FileDlgPath', filename) doSave(filename)
def onClicked(event): if not self.path: return filename = mh.getSaveFileName(os.path.splitext(self.path)[0], 'PNG Image (*.png);;JPEG Image (*.jpg);;All files (*.*)') if filename: self.image.save(filename)
def onClicked(event): filename = mh.getSaveFileName( mh.getPath("scenes"), 'MakeHuman scene (*.mhscene);;All files (*.*)') if filename: self.scene.save(filename) self.updateFileTitle()
def onClicked(event): filename = mh.getSaveFileName(self.filename or self.directory, 'Python scripts (*.py);;All files (*.*)') with open(filename, "w") as f: f.write(self.scriptText.getText()) dlg = gui.Dialog() dlg.prompt("Save script","File was written in an acceptable manner","OK") self.filename = filename self.directory = os.path.split(filename)[0]
def onClicked(event): filename = mh.getSaveFileName( G.app.settings.get('Scene_Editor_FileDlgPath', mh.getPath('data/scenes')), 'MakeHuman scene (*.mhscene);;All files (*.*)') if filename: G.app.settings['Scene_Editor_FileDlgPath'] = filename doSave(filename)
def onClicked(event): if not self.path: if not os.path.exists(mh.getPath('render')): os.makedirs(mh.getPath('render')) self.path = mh.getPath('render') filename = mh.getSaveFileName(os.path.splitext(self.path)[0], 'PNG Image (*.png);;JPEG Image (*.jpg);;All files (*.*)') if filename: self.path = os.path.dirname(filename) self.image.save(filename)
def onClicked(event): if not self.path: if not os.path.exists(mh.getPath('render')): os.makedirs(mh.getPath('render')) self.path = mh.getPath('render') filename = mh.getSaveFileName( os.path.splitext(self.path)[0], 'PNG Image (*.png);;JPEG Image (*.jpg);;Thumbnail (*.thumb);;All files (*.*)' ) if filename: if os.path.splitext(filename)[1].lower() == '.thumb': self.image.save(filename, iformat='PNG') else: self.image.save(filename) self.path = os.path.dirname(filename)
def onClicked(event): filename = mh.getSaveFileName( mh.getPath(), 'JSON File (*.json);;All files (*.*)') if filename: doSave(filename)
def onClicked(event): filename = mh.getSaveFileName(mh.getPath("scenes"), 'MakeHuman scene (*.mhscene);;All files (*.*)') if filename: self.scene.save(filename) self.updateFileTitle()