Sprite sheet data format improvements ("frames" in exported JSON are not very convenient to use)


The current sprite sheet data has the following format:

  "frames" : {
     "<filename> (<layer>) <frame number> <extension>" : { ... } }

(e.g. “animations (main) 10 .aseprite” means the 10th frame of “main” layer in “animations.aseprite” file)

Unfortunately, this is not as easy to parse as something like this:

  "animations.aseprite": {
    "layers" : { 
        "main": {
            "frames": [ 
                    "frameNumber": 10,

Parsing filename, extension, layer name and frame number is not very convenient when you read data from JSON, so it would be pretty great if this animation wasn’t concatenated into one string.

Any thoughts? The current sprite sheet data format doesn’t seem to be documented, so maybe it can be extended in some way?

P.S. It would also be great if calling app.command.ExportSpriteSheet returned some Lua data which can be used for further custom JSON generation, so that might solve my problems with the current format in a way.

Hi @EliasDaler, yeah one downside is that the current JSON sprite sheet is not well-documented (it’s like a “de-facto standard” for sprite sheets, but I’m not sure what is the origin of the format, maybe TexturePacker).

About the JSON format you propose, I think you will find this script useful: GitHub - dacap/export-aseprite-file: Little Aseprite script to export the data inside a .aseprite (it can be adjusted to export whatever you need to export)

Yeah, it looks similar to TexturePacker’s file format, so I guess I’ll need to learn to parse it anyway. :slight_smile:

As for the script - the problem is that I want to get info about the generated package sprite sheet - I can’t extract that data unless I actually call app.command.ExportSpriteSheet and then parse the output JSON.