Hi Mo,
It is located about line 3891 in the original source code. No real need to comment it out, but good practice to eliminate duplicates.
Here is another modification to try out:
On the Node Editor:
To have the Save function use the current file as the save file instead of typing it in everytime:
On the 'editor.js' file location:
code:
Editor.prototype.onSaveButton = function ()
{
if (this.graph.blocked) return;
var saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..', lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );
if ( !saveFilePath ) return false;
if ( this.graph.status !== LGraph.STATUS_STOPPED ) this.onPlayButton();
var file = moi.filesystem.openFileStream( saveFilePath, 'w' );
file.writeLine(LiteGraph.JSONprettify(this.graph.serialize(), {"indent":" ", 'maxLength':150}));
file.close();
this.graph.filename = saveFilePath;
this.graph.setDirtyCanvas(true,true);
}
Change the second line:
code:
var saveFilePath = moi.filesystem.getSaveFileName( lang.getTranslation('Save as')+' ..', lang.getTranslation('MoI Nodeeditor files')+' (*.nod)|*.nod' );
To:
code:
Editor.prototype.onSaveButton = function () {
.
// wjh 4-19-2022
var saveFilePath = moi.filesystem.getSaveFileName(lang.getTranslation('Save as') + '..', lang.getTranslation('MoI Nodeeditor files') + ' (*.nod)|*.nod',lang.getTranslation(this.graph.filename));
.
.
}
|