Created
December 30, 2025 17:37
-
-
Save manuq/2381eb0ab1d7a2707608c9d246904b63 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| Aseprite script to export all layers as sprite sheets. | |
| ]] | |
| local spr = app.activeSprite | |
| if not spr then | |
| return print('No active sprite') | |
| end | |
| local path,title = spr.filename:match("^(.+[/\\])(.-).([^.]*)$") | |
| for i,layer in ipairs(spr.layers) do | |
| local fn = path .. title .. '-' .. layer.name | |
| -- Ignore layers starting with "xxx": | |
| if layer.name:find("^" .. "xxx") then | |
| goto continue | |
| end | |
| app.command.ExportSpriteSheet{ | |
| ui=false, | |
| recent=false, | |
| askOverwrite=false, | |
| type=SpriteSheetType.HORIZONTAL, | |
| textureFilename=fn .. '.png', | |
| -- mergeDuplicates=true, | |
| layer=layer.name, | |
| } | |
| ::continue:: | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment