Skip to content

kedepot/keKit-Krita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keKit

A simple general purpose script collection plug-in. Current version: 0.14

Designed to be as compact as possible when used as a docker:

2023-10-46_16-14-46

 

Installation

  1. Download zip file (from 'Releases' --> )
  2. Follow the Installation Guide in Krita Docs  

Updating

  1. Close Krita
  2. Manually overwrite the kekit folder in your plugin directory (See Krita Docs for system specific locatation)
  3. Restart Krita

 

Note: All the scripts can be assigned to shortcuts:

img_shortcuts2

   

keKit Scripts:

 

Center

Centers the selected/active layer
Variants:

  • H : Centers layer to Horizontal center (only)
  • V : Centers layer to Vertical center (only)

 

keGrid

img_grid

Calculates a relative grid (with two subdivisions) based on the document size.
Note: Relative - not "Dynamic": Requires updating (toggle on&off) if your document size changes.
Also: Some smaller visual glitches may occur - it is just auto-calculating the regular fixed grid.

Options:

  • Snap: Also toggles snapping on/off
    Note: Krita layer snapping only uses the mouse pointer
    A layer bounding box (or center) based grid snapping solution does not exist afaict
  • 3rd: Uses Rule of Thirds instead for quad grid layout

 

keBatch

img_batchexport

  • Batch-exports paint, group, clone & vector layers, set to visible, from the current active document.
  • Automatically creates a sub directory for the exports based on the document name & location
    • The document needs to be saved before the batch operation
  • Visible root layers & groups that are named 'Fx' & 'Background' are excluded:
    • Useful for processing different groups with the same effects and/or backdrop (for example)
    • Any capitalization style of 'Fx' and 'Background' will work (e.g: fx, FX, Fx etc.)

Option:

  • JPG: keBatch uses JPG instead of PNG.
  • Format 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.

 

Average Color (AVG)

Set selection (or entire layer, if you have no selection) to the average color of all the pixels.
Ignores color from transparent pixels - for a better/expected average

  • (F) Option:
    • FAST: (On) Limited pixel sample size for substantial speed increase (any image size)
    • ACCURATE: (Off) Process every single pixel for more accurate result (Very slow on large selections/images)
kekit_krita_average.mp4

 

toRBGA (Channel Packing)

2023-10-23_16-51-23

Automates Channel-packing 3-4 layers into a single image using the RGBA channels. Often used in real-time 3D. 'Splat-maps' or 'ORM Textures' for example.

Note: The Alpha channel in Krita is not editable separately (it will always destroy data in the RGB channels in standard PNG export). Instead, Kritas "Split-Alpha" export can be used in these cases, including toRGBA, for full RGBA-packing export.

Instructions:

  • Select 1-4 layers : Selection order is important: Select each layer in intended RGBA order
  • Run toRGBA
  • The selected layers will be arranged in a group, prepared for export
    • The "New" option toggled will create a new document for the setup
  • If you only use the 3 RGB channels, you may export/save as usual

  • If there's an Alpha layer, it will need to be manually converted to a Transparency Mask (RMB, convert...)
  • RMB the Alpha layer (as Group Transparency Mask) and select Split-Alpha / Save as Merged
  • Note: The alpha layer will be selected & named "makeTM-SplitAlphaMerged" as a reminder/guide ;>

 

Feedback:

Right here. Leave messages (with appropriate tags & description) in Issues tab at the top!

Alternatively, check the keKit thread on the krita-artists.org forum.