mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 03:32:48 +00:00
lua: remove Sprite:save()
At the moment we will remove this function because it makes more sense to use saveAs() from scripts.
This commit is contained in:
parent
2b3e386d15
commit
99d7a434d4
@ -114,20 +114,6 @@ int Sprite_crop(lua_State* L)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Sprite_save(lua_State* L)
|
||||
{
|
||||
auto sprite = get_ptr<Sprite>(L, 1);
|
||||
if (sprite) {
|
||||
Doc* doc = static_cast<Doc*>(sprite->document());
|
||||
app::Context* appCtx = App::instance()->context();
|
||||
appCtx->setActiveDocument(doc);
|
||||
Command* saveCommand =
|
||||
Commands::instance()->byId(CommandId::SaveFile());
|
||||
appCtx->executeCommand(saveCommand);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Sprite_saveAs(lua_State* L)
|
||||
{
|
||||
auto sprite = get_ptr<Sprite>(L, 1);
|
||||
@ -569,7 +555,6 @@ const luaL_Reg Sprite_methods[] = {
|
||||
{ "__eq", Sprite_eq },
|
||||
{ "resize", Sprite_resize },
|
||||
{ "crop", Sprite_crop },
|
||||
{ "save", Sprite_save },
|
||||
{ "saveAs", Sprite_saveAs },
|
||||
{ "saveCopyAs", Sprite_saveCopyAs },
|
||||
{ "loadPalette", Sprite_loadPalette },
|
||||
|
Loading…
x
Reference in New Issue
Block a user