See what filters can be used and apply them to your image
Krita has a lot of filters between the built-in ones, and the extra ones provided by the G'Mic library. With the filters API, you only have the internal filters available. To get a list of all the filters you can use, you can print them out from Python with this code.
Note
The filters API is still a work in progress. While it has some functionality, it is a bit limited and rough around the edges.
The output will contain an array of strings that contain the IDs for all the filters that can be applied. Let's see how to apply one next.
We have a list of IDs of filters we can apply. Let's apply the "sharpen" filter from the list. This is how we would apply it to a layer.
While some filters don't require any settings, most do. Each filter has its own configuration object. This configuration object can be updated to change the results of the filter. Let's see how to grab the configuration object and update a few properties before applying it.
Grabbing this configuration will work sometimes depending on the filter. There are currently still some bugs though. For example, if you try to grab the configuration option for the 'halftone' filter, Scripter will give an error that it cannot convert a KoColor to python. As scripting mature in Krita, this issue will be fixed. This page will be updated whenever fixes or changes happen with the filter API.
Head to the Krita artists where we have a dedicated area for plugin development and give any feedback you might have.