Krita Batch Exporter
2020/06/23
- Type
- Tool
- Format
- Downloadable
- Version
- Krita
- Subject Tags
- Code
- MIT
- Game Assets
- CC BY-NC-SA
- All else
- 2016-2026, GDQuest© - All rights reserved
- Created
- Updated
- 2020/06/23
- 2020/06/23
Krita Batch Exporter is a free and open-source plugin that lets you export many layers and groups from a single Krita document in one go. It is officially included in Krita since version 4.4.0, so there is nothing to download or install.
When you have dozens of game sprites or assets in one Krita file, exporting them one by one is slow and error-prone. Batch Exporter automates that by reading metadata tags you write directly in layer names, then exporting everything at once.
Since Batch Exporter ships with Krita, you only need to turn it on:
You will find the plugin's panel in the Docker menu once it is active.
The plugin reads metadata tags you add to layer names to decide what to export and how. A layer named CharacterTorso e=png s=50,100 tells the plugin to export that layer as two PNG files: one at full size and one at half size.
All tags are optional, and you only add the ones you need.
Here's the list of tags you can use to control which images get exported and how:
e=png: the file formats to export. Supports png and jpg. This is required to export a layer automatically. All other tags have no effect without this.s=100 or s=50,100: the image export scale in percent. s=100 means "export this image without scaling it" and s=25 means "scale this down to 25%." You can list multiple comma-separated values to export multiple sizes.p=path/to/folder: a custom output path, absolute or relative to your Krita document. Use quotes for paths with spaces: p="my folder/assets".m=20: extra margin in pixels added around the layer. By default the plugin trims each layer to its content's bounding box, so use this when you need extra space around the edges.t=no: disable trimming for this layer, so the export uses the full document canvas size instead.i=no: disable tag inheritance from parent groups for this layer (see the Tag inheritance section below).If you use multiple tags, separate them with spaces. A layer name with several tags looks like this: LeftArm e=png s=50,100 m=10. The plugin would export two PNG files for that layer, each with 10 pixels of padding, one at full size and one at half size.
The plugin gives you two ways to export:
e= tag in its name.By default, exported files go into an export folder next to your Krita document. Group layers become folders and individual layers become files, mirroring the layer structure of your Krita document.
Adding tags to many layers individually takes time. The smart rename tool lets you update many layers at once. Select the layers you want to change, type a tag or replacement into the text box, and press Enter.
For example, select ten layers, type e=png s=50,100, and press Enter. All selected layers get those tags added without touching anything else in their names.
If you later want to change s=50,100 to s=75,100, select the layers and type just s=75,100. The tool updates the size tag and leaves the rest of the name alone.
You can also use the rename tool to clean up text. Writing GroupLayer= and pressing Enter removes the word "GroupLayer" from all selected layer names. The pattern is find=replace, and leaving the right side empty deletes the matched text.
When you have many layers inside a group, you can put shared tags on the group itself rather than repeating them on every child layer. Child layers then pick up the group's tags automatically.
For example, if you have a layer structure that looks like this, with a group at the top and three child layers:
All three child layers will be exported as PNG at 50% and 100% scale into assets/characters, without any tags on the child layers themselves.
If one child needs different settings, just add tags to that one child layer directly and they will override the inherited ones. To turn off inheritance for a specific layer entirely, add i=no to its name.
Don't stop here. Step-by-step tutorials are fun but they only take you so far.
Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.
Get help from peers and pros on GDQuest's Discord server!
20,000 membersJoin ServerThere are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!
Sponsor this library by learning gamedev with us onGDSchool
Learn MoreImprove and build on assets or suggest edits onGithub
Contributeshare this page and talk about GDQUest onRedditYoutubeTwitter…
Site in BETA!found a bug?