Krita Random Exporter

Krita Scripter exporter for generating large batches of layered variations with rarity control and optional animation output.

GitHub Repo

Overview

Krita Random Exporter is a Python script for exporting randomized combinations of visible Krita layers, with weighted traits, rarity groups, unique combinations, JSON metadata, and optional animated GIFs.

Setup

Edit the configuration block in randomMassExporter.py, then run it through Krita's built-in Scripter plugin with the source document open.

Layer hierarchy in the Krita file needs to mirror the attribute setup in the script, with names formatted as traitName_variationName.

Animation export

For animation output, enable GENERATE_ANIMATION and point FFMPEG_EXECUTABLE at FFmpeg.

Included Features

Layer Combinations

Builds exports from structured groups of visible Krita layers.

Weighted Traits

Gives individual variations deliberate selection weights.

Rarity Groups

Controls how often broader trait groups appear across a batch.

Unique Results

Avoids duplicate combinations while generating a large set.

JSON Metadata

Writes structured metadata beside the exported images.

Animation Export

Can assemble optional animated GIF output through FFmpeg.