keKit for Krita

Hello! Long time lurker, new forum-user & add-on developer (I guess!)

After using Krita for some time (a couple of years now) I have made a few scripts.
I have now made these publicly available as “keKit* for Krita” on Github.

img_docker

*I am using the same naming scheme as with keKit for Blender or Modo, however the scope is far more modest here ;>

Download here! (Github)

Features v0.1:

(Note: I will not keep this post updated: check the link above for the latest features & updates)

Center

Centers the selected/active layer

keGrid

Calculates a relative grid (with two subdivisions) based on the document size

Options:

  • Snap: Also toggles snapping on/off. Note: Krita layer snapping only uses the mouse pointer: Layer bounds+center snapping TBD
  • 3rd: Uses Rule of Thirds instead for quad grid layout.

keBatch

  • Batch Exports visible Groups/Folders.
  • Automatically creates a subfolder for the exports based on the document name & location.
    • Thus requires new documents to be saved before batch operation
  • Visible root layers (& groups that are named ‘Fx’ & ‘Background’) are excluded:
    • Useful for processing each of the exported groups with the same effects and/or backdrop

Option:

  • JPG: keBatch uses JPG instead of PNG.
    • Defaults (override in ke_batch.py if needed):
    • PNG: Alpha, Level 0/Uncompressed. For maximum speed now - pngcrush later
    • JPG: 85%. For WIP & quality insensitive use-cases

Note: Slow - the process can take a long time in big documents with a lot groups

Half & Double

Scale selected layer 50% or 200%

Fit Bounds

Stretches selected layer to fit the document bounds Option:

  • Aspect: Fit Bounds maintains aspect ratio of the image

Transform Method

Choose preferred pixel transform processing method for Half, Double & Fit Bounds:

  • Mitchell, Lanczos3 etc.
26 Likes

:slight_smile: Hello @Kjell, and welcome to the forum!

Thanks for sharing! :bowing_man:

Michelist

2 Likes

Welcome to the forum, @Kjell. Thank you for this plugin. I have a feeling this is going to be very popular.

1 Like

That grid script would’ve saved me so much time! These are great

1 Like

Does the PNG batch option simply export the ‘mergedpreview.png’ file from the KRA file?

Hi,
No. The preview image would be the merged result, no?

  • The example image (boxes marked 1 & 2) above shows three stacked images/layers, each in a group.
  • Box nr2 shows the effects layer being activated/made visible, changing the colors of all the layers & groups below it.
  • Box nr3 shows the end result in a file browser.

Note that you can click the image above to enlarge it.
I might do a video at some point, might make things easier to understand.

Thanks!

I should note, the solution is pretty hacky: There may be some visual glitches* and what not, as the fixed grid (as it still is) is not made for this :wink:

*such as weird over-draw:

Has worked ok for me though :slight_smile:

I get it now - it’s a batch layer exporter. :wink:

1 Like

I have updated/changed the batch export functionality: (not just groups now)

notes updated:

  • Batch-Exports visible paint layers, group layers, clone layers, & vector layers from the current active document
  • Automatically creates a subfolder for the exports based on the document name & location
    • Thus requires new documents to be saved before batch operation
  • Visible root layers & groups that are named ‘Fx’ & ‘Background’ are excluded:
    • Useful for processing each of the exported groups with the same effects and/or backdrop
    • Any capitalization is accepted (e.g: fx, FX, Fx etc.) exclusion-words are converted to lower-case in the script

(same link as in original post)

1 Like

Back again! (with v0.12) ;>
I have added a new script (“toRGBA”) for automating Channel-packing 3-4 layers into a single image using the RGBA channels. See github entry for more details:

I would have liked to automate the last step; Converting the alpha to Transparency Mask.
But, just running the “action” did not work & I spent far too many hours trying to figure it out with no luck. If anyone knows how to do it without using the action, let me know! :slight_smile:

3 Likes

Minor logistics update:
I am considering migrating to gitlab (in general), so, JFYI:

keKit for Krita is now also available on GitLab

(I will probably use both (GitLab & GitHub) for a while)

3 Likes

Wow! Awesome plugin, this will save me a bunch of time!! Thank you for sharing!

Can I suggest a feature? Centering only the horizontal or vertical axis would be great

keep the good work and thanks again :slight_smile:

1 Like

Maybe! I have planned something similar as an option: A workaround for the lack of layer snapping (more or less just checking the layer center pos and snapping it to nearest grid intersection point (where 2 lines cross) , instead of just the center of the doc) Maybe the full bounding box of the layer. at some point.
(Things are a bit busy atm though. ETA TBD)

1 Like

Thats really cool! Thx for your work!

1 Like

Long time no update! ;>

Added horizontal and vertical centering options. Links in 1st post.

Centering Demo:

8 Likes

Thank you for posting the update.

1 Like

That is incredible! Thank you very much for this

2 Likes

Long time no update ;>

Preview WIP demo of a new feature : “Average Color”
Why? I could not for the life of me figure out how to do it - other than in g’mic. :wink:
(And that one includes transparent pixels = bad average. + g’mic is too inconvenient for such a simple task ) So here we are! ;D

(next kekit release is real soon™)

5 Likes

Looks interesting, even promising, I’m waiting to be surprised! :+1:

Michelist

keKit for Krita 0.14 released!

NEW: Average Color
(As shown in the wip video in my previous post above)

Also; keKit will no longer have -preset- shortcuts. Most features (including Average Color) are still assignable, of course.

Links in 1st post!

5 Likes