[Note: I know the main focus of the team right now is on bugfixing and polishing Krita, and I don't want to distract from that, but this is meant to be a more of a long-term idea and discussion.]
This is a rough initial concept proposal for an advanced, "Multi-target Exporter" feature for Krita.
As of Krita 4.1, the export functionality is limited to exporting your entire, flattened artwork as a single file, with a single format, at the original size. As such, it functions much in the same way as the "save as" dialog, with the extra convenience of allowing you to export as a different file format while saving your project as a Krita document.
This new Multi-target Exporter exporter is designed to expand upon (and ultimately replace) the classic exporter by adding support for exporting multiple Export Targets.
Defining an "Export Target".
At the core of the Multi-target Exporter is a set of individual Export Targets. Each Export Target represents an individual export configuration, with a variety of options, such as:
- Path: Where this export target will export to, with special macros like $HOME (user's home or mydocuments folder) and $DOCUMENT (the same directory as the current .kra Krita document). A button next to this field will open the file browser, allowing the user to select the directory.
- Format: The file format that this export target will export as. A button next to this field will open a format-specific settings dialog. (Not shown in the original mock-up image)
- Source: This option allows the user to control exactly what is exported by this particular export target. By specifying a layer or group name, the user can export only the contents of a specific layer or group, for example. By using consistent naming conventions the user can even export multiple images with a single target (i.e. using "Sketch" to export multiple different images for each layer that's named "Sketch"). By leaving the source field blank or using a macro such as $MASTER or $MERGED, the entire image will be exported.
- Scale: These options allow the user to export their artwork at a different size than their document for each export target. "Auto" filtering would automatically pick a well-suited filtering algorithm depending on whether the user is enlarging or reducing their image.
Note: Of course, it could/should be possible to add even more per-target export options, like enabling/disabling certain channels, cropping, changing color spaces, saving animation frames out as individual images or a sheet. 'swizzling' or weaving multiple grayscale images into each channel of a single image (a common compression strategy for things like game art assets), etc.
What does this amount to?
The strength of such a system is the ability to set up multiple Export Targets within your Krita Document, allowing you to set up export schemes that are as simple or as complex as the your workflow demands. For example:
- A digital painter may want to work at a very high resolution and export their entire painting at multiple sizes (100%, 50%, 25%, etc.)
- A web developer may want to export their project as multiple file formats, including different kinds of raster and vector formats.
- An illustrator or animator may want to be able to export their lines or background as a separate image while also exporting their finished work.
- A game developer may want to manage multiple texture maps (color, roughness, metalness, normal, etc.) for a given asset as different groups within a single Krita Document and export them all at the same time.
These are just a few examples off the top of my head, but a system in which users can set up their own export targets would give them a lot of flexibility and power to do almost anything. What's more, creating presets for export targets (which could possibly be shared between users as a resource) would make it quick and easy to set up even complex export schemes.