Skip to content

Instantly share code, notes, and snippets.

@gsteigert
gsteigert / Export Groups.lua
Created November 1, 2021 15:17
An Aseprite script to ease exporting a bunch of layers and groups into packed sprite sheets (a.k.a. texture atlases).
-- This script will:
-- (1) Flatten each group into a layer;
-- (2) Invoke the 'export sprite sheet' command;
-- (3) Undo the changes.
--
-- v1.0: Initial version.
--
-- Ref: https://github.com/aseprite/aseprite/blob/main/src/app/commands/cmd_export_sprite_sheet.cpp
local spr = app.activeSprite