This page looks best with JavaScript enabled

Unity plugin: auto-export PNG from krita files

 ·  โ˜• 1 min read


The previous post about auto-export of aseprite-files. The reasons for using similar plugin for krita-files are the same and in addition to more convenient browsing image files in file managers and comparing their versions in VCS there is another: Unity doesn’t support kra-files, so we have to export them anyway.

The plugin’s work is based on Unity’s method OnPostprocessAllAssets: when Unity finds modified krita-file it creates png next to it.

A .kra file is actually an archive and contains a file named “mergedimage.png” which contains the rendered image as you see it on your canvas (see Krita docs for more info). The plugin gets mergedimage.png out and renames it.

The code is on GitHub under MIT license. Iโ€™m using Linux Mint for development, so not sure how difficult it would be to support Windows and MacOS. My guess is that not very hard as both scripts are half-page long.

Krita’s mascot, Kiki, is an anthropomorphic cybersquirrel (because it turns
out that Krita is Albanese for squirrel).

A little demo:

Share on