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

Duplicate data with --sheet CLI #2128

Closed
tommy-mitchell opened this issue Aug 1, 2019 · 2 comments
Closed

Duplicate data with --sheet CLI #2128

tommy-mitchell opened this issue Aug 1, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@tommy-mitchell
Copy link

tommy-mitchell commented Aug 1, 2019

I'm attempting to use the CLI to split a sprite by it's slices, then combine that into a horizontal sheet pack. Here's the batch commands I'm using:

%ASEPRITE% -b "%~1" --save-as "%~2/%aspTempFolder%/sprite-{slice}.png"

%ASEPRITE% -b "%~2/%aspTempFolder%/sprite-*.png" --sheet "%~2/sheet.png" --data "%~2/%aspTempFolder%/data.json"

where the first parameter is the source file and the second is the output destination.

The slicing works well, and each appears in a separate .png file in my temp folder. However, the sprite sheet has duplicate entries:

Sprite:
original sprite
Expected result:
expectation

Actual result:
reality


Looking at the JSON data shows that each slice (i.e. each .png file in the temp folder) is processed as many times as there are slices:

"sprite-slice0 0.png": { },
"sprite-slice0 1.png": { },
"sprite-slice0 2.png": { },
"sprite-slice0 3.png": { },
"sprite-slice0 4.png": { },
"sprite-slice0 5.png": { },

I'm not sure if the problem lies with Aseprite's CLI or with my own (cobbled-together) batch commands.


Edit: I can get this to work by slicing the .ase file with the first command, and then opening all of the generated .png files as a single animation in Aseprite. From there, I can use the "Export Sprite Sheet" dialog to get what I want. However, I'd like to be able to do this without that extra hassle.

Aseprite and System version

  • Aseprite version: v1.2.11-x64, Steam
  • System: Windows
@mrspeaker
Copy link

mrspeaker commented Aug 6, 2019

I'm having trouble recreating this issue, as on my machine (mac) it doesn't let me specify multiple files with sprite-*.png. It tells me File not found: "sprite-*.png". No documents to export. Is that batch format (with the %1, %2...) special? I have to list the files individually: aseprite -b sprite-01.png sprite-02-png --sheet sheet.png.

Doing this I get a correct output: though vertically, not horizontally stacked!

@dacap dacap added this to the v1.x-bugs milestone Oct 1, 2019
@dacap dacap self-assigned this Oct 1, 2019
@dacap dacap added the bug label Oct 1, 2019
@dacap
Copy link
Member

dacap commented Oct 24, 2019

I think the problem here is that ".../sprite-*.png" is listing all frames of the slice, so "sprite-slice0 0.png", "sprite-slice0 1.png", "sprite-slice0 2.png", "sprite-slice0 3.png", etc. are specified in the command line. Each file loads the whole sequence of frames creating its own animation. Similar to the problem from: #1936 (comment)

@dacap dacap closed this as completed in 1255b17 Jul 30, 2020
AdamJablonski pushed a commit to AdamJablonski/aseprite that referenced this issue Sep 6, 2020
We've also fixed the Agree/Skip dialog to show a checkbox and repeat
the same action for all image sequences.

Fixes:
aseprite#2128
aseprite#1936 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants