Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with "frameTags" output when exporting an individual layer #2116

Closed
Cardinal90 opened this issue Jul 24, 2019 · 2 comments
Closed

Problem with "frameTags" output when exporting an individual layer #2116

Cardinal90 opened this issue Jul 24, 2019 · 2 comments
Assignees
Milestone

Comments

@Cardinal90
Copy link

@Cardinal90 Cardinal90 commented Jul 24, 2019

Hello,

This is my timeline
e05ccb15c391443e01ac5218960eb784

Here is an .aseprite file

I am exporting the "door-cover" layer with this command:
aseprite.exe -b --layer "door-cover" basic-door.aseprite --trim --sheet-pack --sheet door-cover.png --format json-array --list-tags --data door-cover.json

Here is the result:

{ "frames": [
   {
    "filename": "basic-door (door-cover) 3.aseprite",
    "frame": { "x": 0, "y": 80, "w": 96, "h": 41 },
    "rotated": false,
    "trimmed": true,
    "spriteSourceSize": { "x": 0, "y": 5, "w": 96, "h": 41 },
    "sourceSize": { "w": 96, "h": 96 },
    "duration": 80
   },
   {
    "filename": "basic-door (door-cover) 13.aseprite",
    "frame": { "x": 0, "y": 0, "w": 96, "h": 80 },
    "rotated": false,
    "trimmed": true,
    "spriteSourceSize": { "x": 0, "y": 5, "w": 96, "h": 80 },
    "sourceSize": { "w": 96, "h": 96 },
    "duration": 80
   }
 ],
 "meta": {
  "app": "http://www.aseprite.org/",
  "version": "1.2.13-x64",
  "image": "door-cover.png",
  "format": "RGBA8888",
  "size": { "w": 128, "h": 128 },
  "scale": "1",
  "frameTags": [
   { "name": "Up-closed", "from": 0, "to": 0, "direction": "forward" },
   { "name": "Up-opening", "from": 1, "to": 1, "direction": "forward" },
   { "name": "Up-closing", "from": 2, "to": 2, "direction": "forward" },
   { "name": "Up-opened", "from": 3, "to": 3, "direction": "forward" },
   { "name": "Down-partial", "from": 4, "to": 4, "direction": "forward" },
   { "name": "Down-reveal", "from": 5, "to": 12, "direction": "forward" },
   { "name": "Down-opened", "from": 13, "to": 13, "direction": "forward" }
  ]
 }
}

I am not sure if this behavior is intended. I expected to see either a number of empty frames (considering I don't use --ignore-empty) or frameTags having valid from and to fields. As it stands, frameTags output is absolutely useless. Is it possible to fix it?

Aseprite and System version

  • Aseprite version: 1.2.13, Steam
  • System: Windows 10 x64
@dacap

This comment has been minimized.

Copy link
Member

@dacap dacap commented Jul 31, 2019

Thanks for reporting this @Cardinal90, I'll try to prepare a fix for the next version. I think the problem is that --trim is removing frames from the final result, and then frameTags is not updated properly to reflect that.

@dacap dacap added this to the v1.x-bugs milestone Jul 31, 2019
@dacap dacap self-assigned this Jul 31, 2019
@dacap dacap added the cli label Sep 27, 2019
@dacap

This comment has been minimized.

Copy link
Member

@dacap dacap commented Oct 1, 2019

Finally, this will be fixed adding empty frames to fill the items of the JSON array with empty frames (if -ignore-empty is specified, those empty frames will be removed). Also we'll try to remove duplicate entries in the .png output with -sheet-pack so space is not wasted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.