Slices and Spritesheet

Hello, is there a way to use slices and save to spritesheets? This is what I have tried to do in my batch file:
But it simply saves a spritesheet of the entire file.

%ASEPRITE% %FILENAME% --slice East --sheet East/%SAVEFILENAME%E.png

Are you asking about taking slices on a still image and packing them into a spritesheet, or making spritesheets out of animated slices?

I am pretty sure there is not a built-in way to do either and the spritesheet feature ignores slices entirely, you’ll need to do this work yourself (i.e. rearrange the art, or crop and export slice by slice). Scripts can automate this though. I’m not Lua-savvy enough to write this for you, but perhaps if you explain which you mean, someone else could help.

Hi Eishiya,
I was trying to use slices to export a spritesheet from an animated .ase that contains multiple character animations.

I found a way to do it. But as you mentioned, its not an aseprite feature. I created a batch file to --slice and --save-as the single frames. Then batch process the single frames into a --sheet, deleting the single frames after. It’s a bit lengthy, but it works great by breaking down the steps as such in a batch file.

Glad you found something that works for you!

FWIW the intended way to handle multiple animations in Aseprite is to have them in sequence rather than all at once, so the document only shows one animation at a time. Then, you can have the spritesheet include only the chosen animation(s).

They are in sequence. In 8 varying directions at once + other animations in other directions as well.

I mean, the directions in that case should be in sequence as well, rather than displayed all at once.

Thank you for the unsolicited advice on how to organise my files.

I was not advising you on how to organise your files - your arrangement makes it easier to make sure the animations match, and is a fairly common way of working. I was only explaining Aseprite’s intended workflow, which is the likely reason why slices don’t play well with spritesheets.

Thank you for being helpful. I understand now :slight_smile: