You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As can be seen, Aseprite has dropped frame (2 in editor, 1 in file) from the "frames" array as it is empty, but the frame ranges in "frameTags" still act as though it is there (three frames have been exported, 0-2, but frames 2-3 are referenced).
I'm not sure this is correct anyway - if a frame is supposed to be empty, even if ranges shift to accommodate dropped frames, the frame will be skipped.
For now I will use --filename-format {frame} and --format json-hash to work around this (I need to determine which items in "frames" correspond to the ranges defined in "frameTags").
The text was updated successfully, but these errors were encountered:
jameswilddev
changed the title
"frames" and "frameTags"->"from"/"to" lose ordering when frames are empty and --trim is used
CLI JSON - "frames" and "frameTags"->"from"/"to" lose ordering when frames are empty and --trim is used
Sep 2, 2016
jameswilddev
changed the title
CLI JSON - "frames" and "frameTags"->"from"/"to" lose ordering when frames are empty and --trim is used
CLI JSON - "frames" and "frameTags"->"from"/"to" do not match "frames" when frames are empty and --trim is used
Sep 2, 2016
jameswilddev
changed the title
CLI JSON - "frames" and "frameTags"->"from"/"to" do not match "frames" when frames are empty and --trim is used
CLI JSON - "frameTags"->"from"/"to" do not match "frames" when frames are empty and --trim is used
Sep 2, 2016
Hi @jameswilddev, about this bug, I'm still not yet sure how to fix this issue properly. In this specific case, as the empty frame is outside the tag, it looks like we should completely ignore the empty frame and tag b should adjusted to the range from 1 to 2 (range [1,2]).
Anyway what happens if the empty frame is inside the tag a (i.e. a tag has two frames, [0,1] range)?
Should tag a be adjusted to [0,0] range when the frame 1 is trimmed/discarded because it's empty? Or should tag a include the empty frame and in that case the JSON array include an empty frame too (which I'm not sure how it should be specified)?
I'm still thinking about this. In your specific case the frame tags from/to fields should be adjusted as you said, but in the second case I gave, where the empty frame is inside the frame tag, the frame could be kept with an empty/invalid frame and spriteSourceSize fields (0,0,0,0):
Anyway, in a second thought I'm thinking that information about empty frames might useful in all cases (even in your own case). (e.g. to known the frame duration). Maybe --ignore-empty option might be useful to completely discard the empty frames in these cases. I've to think more about this issue.
When the following file is exported using:
aseprite --batch --trim --list-tags --sheet player.png player.ase --format json-array --data player.json
player.zip
The following JSON file is created:
As can be seen, Aseprite has dropped frame (2 in editor, 1 in file) from the "frames" array as it is empty, but the frame ranges in "frameTags" still act as though it is there (three frames have been exported, 0-2, but frames 2-3 are referenced).
I'm not sure this is correct anyway - if a frame is supposed to be empty, even if ranges shift to accommodate dropped frames, the frame will be skipped.
For now I will use --filename-format {frame} and --format json-hash to work around this (I need to determine which items in "frames" correspond to the ranges defined in "frameTags").
The text was updated successfully, but these errors were encountered: