app.command.SaveFile {
ui=true,
filename="",
filenameFormat="",
tag="",
aniDir=AniDir,
slice="",
fromFrame=frame,
toFrame=frame,
ignoreEmpty=false,
bounds=Rectangle,
}
app.command.SaveFileAs { ... }
app.command.SaveFileCopyAs { ... }Saves the current image in a specific file. These 3 commands have little differences by default:
SaveFile: It's like File > Save option. It will try to save the active sprite with its already associated file, in other case acts like theSaveFileAsshowing the dialog to select the filename.SaveFileAs: It's like File > Save As option. Saves the active sprite in a new file (shows the dialog to select a file by default). The active sprite filename will be changed to the new selected filename.SaveFileCopyAs: It's like File > Export option. Saves a copy of the active sprite in other file. The filename will be kept intact.
Parameters:
ui: Shows the dialog to select the filename.SaveFiledoesn't show the UI (falseby default) if the sprite has an associated file.SaveFileAsandSaveFileCopyAswill show the UI by default.filename: The filename where to save the sprite. The default values is thefilenameFormat: Special value similar to --filename-format when we use --save-as from the CLItag: A tag name. You can save only the range of frames specified by this tag.aniDir: By default it is AniDir.FORWARD, but you can specify any AniDirslice: A slice name (to save only a specific portion of the sprite)fromFrame/toFrame: A range of frames to save.ignoreEmpty:falseby default, but it can betruein case that you want to avoid saving empty frames of a sequence of files (e.g. when saving an animation asframe01.png,frame02.png, etc.).bounds: Available since v1.3-beta21: Only export the selected rectangle of the canvas.