Skip to content

kedepot/keKit-Krita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keKit

A simple general purpose script collection plug-in.

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

docker

 

Installation

  1. Download zip file (from 'Releases' --> )
  2. Follow the Installation Guide in Krita Docs (Use the manual steps, easy enough!)  

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: Some scripts can be assigned to shortcuts:

   

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.

  • Will automatically clear "grid offset" values.
  • Relative, but not "dynamic": Requires updating (toggle on/off) if your document size changes.
  • Some smaller visual glitches may occur - it is just auto-calculating the regular fixed grid.

Options:

  • Snap: Also toggles snapping on/off
    Note: Kritas 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

 

Batch

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', "fg" or "bg" are excluded:
    • Useful for processing different groups with the same effects and/or backdrop (for example)
    • Capitalization indifferent - any style will work: fx, FX, Fx etc.

Options:

  • 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 - oxipng (or pngcrush) later
    • JPG: 85%. For WIP & quality insensitive use-cases

BET

Batch Export Textures - a PBR game/vfx-ish texture export workflow:

  • Exports will be placed in the same dir as the doc (not in a generated sub-dir as Batch above)
  • Layers/groups named "b","d","r","m","ao","e","bump", "disp", "displacement", "roughness", "rough", "metal", "metallic", "emissive", or "mask", will be exported as 8-bit grayscale
  • All others (such as "c" or "n") will be exported as 8-bit RGB.
  • The layers/groups will use the document name as basename and add the the layer/group names as suffixes. E.g: "concrete01.kra" exports becomes "concrete01_c", "concrete01_r" etc. (if the layers are named "c" and "r")
  • Note: The export will autosave (saved doc must be latest, far less annoying than to forget...)
  • PNG-only. Level 0/Uncompressed. For maximum speed now - oxipng (or pngcrush) later

Note: Slow - it can take some 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 layer

 

Transform Method

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

  • Mitchell, Lanczos3 etc.

 

Average Color (AVG)

kekit_krita_average.mp4

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)

 

chPack (RGBA 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.

  • The "New" option toggled will create a new document for the setup

To Export RGB (No Alpha Channel):

  • Select 3 layers - Select one by one in intended RGB order
  • Run chPack & the selected layers will be arranged in a group, prepared for export
  • Export/save as usual

To Export RGBA:
The standard Krita PNG Export will erase data in the RGB channels when using Alpha.
Instead, Kritas "Split-Alpha" feature is used for full RGBA channel export:

  • Select 4 Layers - in RGBA selection order
  • Run chPack & the selected layers will be arranged in a group, prepared for export
  • Use RMB on the created Group Transparency Mask (as the "Alpha Channel") and use Split-Alpha / Save as Merged

 

Tile

kekit_krita_tile Scales, duplicates and places 4 tiles (copies) of the selected layer to fit the image bounds

  • Make sure the layer is trimmed to image size!

 

Seamless Tiling (ST)

kekit_krita_seamless_tiling.mp4

Simple 'cross-offset' seamless tiling - creates a group of masked layers.

  • This is a very simple method, do not expect every case to work well
  • The mask is a regular PNG included in keKit, adjust to your liking if needed
  • Tip: Tweak with Kritas Wrap-around mode.

 

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.