Script Layers

To facilitate the creation of own filters, it would be great to have “Script Layers”: a layer that works like a filter layer (i.e. takes the image from layers beneath it as input and modifies it), but whose logic is written by the user in Python. So a Python function that receives an image as input and outputs the filtered resulting image. Just like filter layers, it’s executed automatically after each brush stroke on lower layers.

The problem with achieving the same result by writing a Plugin is that apparently a Plugin can’t react to brush strokes, i.e. you’d have to run it manually after each brush stroke.

4 Likes

Idea is not bad but I’m afraid of performances

Python is a very slow language, and being able to optimize code to reduce execution time is tricky…

But it could be interesting to see what can be done once with a such functionality :slight_smile:

Grum999

It’s not a problem. The result will simply be visible whenever it’s ready. If something changed since then, the next result will immediately start to compute. You’ll get continuously fresh results while you’re making a brush stoke, without the need to lift the brush, press a hotkey, and then wait every time.

The second attempt at implementing scripting for Krita, using kross (which made it possible to use python, ruby and falkon as languages) made is possible to write filters, generators and paintops as scripts. It was much too slow, though, and for this iteration we have decided not to bind the iterator, filter and generator classes yet.

That feature sounds amazing! :slight_smile: Is there a beta version in which I can work with it?

A brush release event would be so awesome :nerd_face:

Would not a scripting of a layer allow stuff like rigging deformations for animation like in after effects?