advanced-spritesheet-export/advanced-spritesheet-export.lua

79 lines
1.6 KiB
Lua
Raw Normal View History

2024-07-30 01:25:14 +00:00
extKey = "annabunches/abase" -- this must come before we require 'abase-commands'
local cmd = require "abase-commands"
2024-07-22 23:01:26 +00:00
function init(plugin)
plugin:newCommand{
id="ABASEExportSpritesheetAdvanced",
2024-07-22 23:01:26 +00:00
title="Export Spritesheet (Advanced)",
2024-07-30 01:25:14 +00:00
group="file_export_1",
onclick=function()
cmd.ExportSpritesheetAdvanced()
end,
onenabled=function()
return app.activeSprite ~= nil
end
}
plugin:newMenuSeparator{
group="layer_popup_merge"
2024-07-22 23:01:26 +00:00
}
plugin:newMenuSeparator{
group="layer_merge"
}
plugin:newMenuGroup{
id="abase_layer_settings",
title="Advanced Export",
group="layer_merge",
}
plugin:newMenuGroup{
id="abase_layer_settings_popup",
title="Advanced Export",
2024-07-30 01:25:14 +00:00
group="layer_popup_merge",
}
plugin:newCommand{
id="ABASEToggleIgnoreLayer",
title="Toggle Ignore",
group="abase_layer_settings",
2024-07-30 01:25:14 +00:00
onclick=function()
cmd.ToggleIgnore()
end
2024-07-22 23:01:26 +00:00
}
plugin:newCommand{
id="ABASEToggleIgnoreLayerPopup",
title="Toggle Ignore",
group="abase_layer_settings_popup",
onclick=function()
cmd.ToggleIgnore()
end
}
plugin:newCommand{
id="ABASEToggleExportAsSprite",
title="Toggle Merge Group",
group="abase_layer_settings",
onclick=function()
cmd.ToggleExportAsSprite()
end,
onnenabled=function()
return app.layer.isGroup
end
}
plugin:newCommand{
id="ABASEToggleExportAsSpritePopup",
title="Toggle Merge Group",
group="abase_layer_settings_popup",
2024-07-30 01:25:14 +00:00
onclick=function()
cmd.ToggleExportAsSprite()
end,
onnenabled=function()
return app.layer.isGroup
2024-07-22 23:01:26 +00:00
end
}
2024-07-30 01:25:14 +00:00
end