Save Export Profiles for re-use

The Quick Pitch

Exporting is getting complex… fast. At times it feels a little unmanageable.
As exporting gets more complex, it may be helpful to shift to making exporting more a part of the project. It would be nice to be able to create and save “export profiles” in an aseprite file. Opening an aseprite file would then load all export profiles previously saved with it. These could then be executed individually or all at once.

Detailed how-it-might-work

Imagine you go to file > exports… and it brings up a window where you can manage export profiles for that file. In a new file, this list is empty. Click “add export profile.” This brings up a dialog that shows a list of export templates you could start from. These templates are default ones aseprite provided, or ones you have saved on a global level. Select the one close to what you need, then click “add and edit.” This opens the template edit view. Change any settings you need to, then “save.” Back on the list view, you see the export profile in the list now. Either click “Run selected export” or “Run all exports.” to export using that profile, or all profiles respectively. Made one small change to the file? Click “Run all exports” to re-export with each set of settings. No need to go in and re-export by hand with each set of settings.

All export profiles would be saved into the ‘.aseprite’ file. If you close the file, then re-open it, those exports are there. If you share the file with a co-worker, they get the export settings along with it. Add as many export profiles as you want. Need an export for just half the layers? Add an export profile that exports just those. Need an export that runs a script? Create a profile that does that, all without messing up any export profiles you have so carefully set up for your other needs.

How I, personally, would use it most

I realize some people may not need this feature, so the quick export dialog would be maintained. I would get a huge amount of use out of this, though. When creating characters for my video game, I like to work in one large file, then export it to 4+ different sprite sheets. For example, my player has a separate sprite sheet for his legs and arms so they can be animated separately. That means I have to export “player_legs” and “player_arms”. I also like to animate all the player’s SFX and weapon effects in the same file. That’s another n exports. With the current setup of exports, one small tweak can result in 10+ minutes of re-exporting and verifying that I got the settings right.

1 Like

Hi @cgbeutler! something like this is already planned, there is a pretty old issue about projects and the idea is basically to add some kind of import/export pipeline inside .aseprite files so they can specific connections between files (e.g. linked files like external palettes/tilesets in the future, and export tasks that can be executed all at once or trigger one).

I didn’t think about the details yet, but have a big picture of how it should be (and basically it should be an alternative of the whole CLI)

1 Like

That sounds like it may take a while… Maybe I’ll finally figure out the CLI stuff for now as a psudo export save.

1 Like

As a temporary workaround, I made a script that saves me some time. Feel free to use it.

How the script works:

Exports the currently opened file using group/layer name prefixes to be smart.
Texture files will be auto-named <filename>.png. Json files will be auto-named <filename>.json.

Group/Layer name prefixes currently supported:

  • _ Hide layer from all exports. Useful for guide and reference layers.
  • > Export this layer into additional, separate files. This can be placed on as many groups/layers as you want. Each will be exported to its own files auto-named with suffixes based on their group/layer path. (<filename>[_<group>]_<layer>.png and <filename>[_<group>]_<layer>.json) Note: This does not exclude the layer/group from the base export and the base export will still be done.

Currently only the first prefix is looked at for each layer. If the script gets popular/has feature requests, I may update it. Feel free to change the script however you want. Export settings are in ‘export_current’ if you need to tweak those. It will affect ALL exports using this script.

Installation

Go to File > Scripts > Open Scripts Folder
Place this in the scripts folder.

You can download it from Gist: