Request: More robust JSON export data for how cels relate to layers

Currently, it’s very difficult to relate exported JSON back to the layer hierarchy of the source file.

For example, if I have two groups, each containing a layer; the .frames[x].frame and .frames[x].spriteSourceSize properties are excellent for determining how an exported .png (created with “packed”, “trim”, and “split” options) could be used to reconstruct the source file from exported data; but there is no way to know that .frames[0] corresponds to .layers[1] and .frames[1] corresponds to .layers[3]:

{ "frames": [
   {
    "filename": "MySpriteSheet (Layer 1) 0.aseprite",
    "frame": { "x": 56, "y": 17, "w": 2, "h": 4 },
    "rotated": false,
    "trimmed": true,
    "spriteSourceSize": { "x": 99, "y": 48, "w": 2, "h": 4 },
    "sourceSize": { "w": 128, "h": 128 },
    "duration": 90
   },
   {
    "filename": "MySpriteSheet (Layer 1) 0.aseprite",
    "frame": { "x": 77, "y": 93, "w": 4, "h": 10 },
    "rotated": false,
    "trimmed": true,
    "spriteSourceSize": { "x": 104, "y": 45, "w": 4, "h": 10 },
    "sourceSize": { "w": 128, "h": 128 },
    "duration": 90
   },
  "layers": [
		 { "name": "Group 1" },
		 { "name": "Layer 1", "group": "Group 1", "opacity": 255, "blendMode": "normal" },
		 { "name": "Group 2" },
		 { "name": "Layer 1", "group": "Group 2", "opacity": 255, "blendMode": "normal" },
	]
}

To solve this, it would be helpful to have some extra properties on .frames and .layers objects, such as:

  • .layers[x].cels (an array where values correspond to their index in .frames, imo this is the most important missing property)
  • .frames[x].layer (the layer the “frame” (cel) belonged to in the source file. I know this is already in .filename, but it’s not very scriptable.)
  • .frames[x].group (the group the “frame” (cel) layer belonged to in the source file, if any)
  • .frames[x].frameNumber (the frame # the “frame” (cel) belonged to in the source file, again for scriptability)
{ "frames": [
   {
        "filename": "MySpriteSheet (Layer 1) 0.aseprite",
        "layer": "Layer 1",
        "group": "Group 1",
        "frameNumber": 0,
        "frame": { "x": 56, "y": 17, "w": 2, "h": 4 },
        "rotated": false,
        "trimmed": true,
        "spriteSourceSize": { "x": 99, "y": 48, "w": 2, "h": 4 },
        "sourceSize": { "w": 128, "h": 128 },
        "duration": 90
   },
   {
        "filename": "MySpriteSheet (Layer 1) 0.aseprite",
        "layer": "Layer 1",
        "group": "Group 2",
        "frameNumber": 0,
        "frame": { "x": 77, "y": 93, "w": 4, "h": 10 },
        "rotated": false,
        "trimmed": true,
        "spriteSourceSize": { "x": 104, "y": 45, "w": 4, "h": 10 },
        "sourceSize": { "w": 128, "h": 128 },
        "duration": 90
   },
  "layers": [
        { "name": "Group 1" },
        {
             "name": "Layer 1",
             "group": "Group 1",
             "opacity": 255,
             "blendMode": "normal",
             "cels": [ 0 ]
        },
        { "name": "Group 2" },
        {
             "name": "Layer 1",
             "group": "Group 2",
             "opacity": 255,
             "blendMode": "normal",
             "cels": [ 1 ]
        },
  ]
}

Thanks for your consideration!