mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +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;
|
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)
|
int Sprite_saveAs(lua_State* L)
|
||||||
{
|
{
|
||||||
auto sprite = get_ptr<Sprite>(L, 1);
|
auto sprite = get_ptr<Sprite>(L, 1);
|
||||||
@ -569,7 +555,6 @@ const luaL_Reg Sprite_methods[] = {
|
|||||||
{ "__eq", Sprite_eq },
|
{ "__eq", Sprite_eq },
|
||||||
{ "resize", Sprite_resize },
|
{ "resize", Sprite_resize },
|
||||||
{ "crop", Sprite_crop },
|
{ "crop", Sprite_crop },
|
||||||
{ "save", Sprite_save },
|
|
||||||
{ "saveAs", Sprite_saveAs },
|
{ "saveAs", Sprite_saveAs },
|
||||||
{ "saveCopyAs", Sprite_saveCopyAs },
|
{ "saveCopyAs", Sprite_saveCopyAs },
|
||||||
{ "loadPalette", Sprite_loadPalette },
|
{ "loadPalette", Sprite_loadPalette },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user