About krita internals

Brendan Scott disposableemail at apps.opensourcelaw.biz
Mon Dec 11 21:21:36 UTC 2017

On 12/11/2017 10:59 PM, Boudewijn Rempt wrote:
> On Mon, 11 Dec 2017, Brendan Scott wrote:
>> Hi
>> I am interested in doing some work with Python scripting in Krita, and am
>> trying to decipher how Krita goes about doing what it's doing. I can see that
>> there are nodes and actions, but it's not clear to me how actions are used
>> programmatically.
>> I have found this:
>> http://download.vikis.lt/doc/kde/HTML/en/krita/developers-plugins.html
> Oh gosh, that's so incredibly old -- eleven years adn two version of Qt!

Yes, I was wondering if it was all out of date.


> The short version is, the action collection allows us to retrieve actions
> by name, and then you can programmatically trigger them. Actions are used

using <action>.trigger()?

> to build up the user interface: menu, toolbar buttons and shortcuts and
> so on. So, triggering an action is exactly like pressing the shortcut
> or selecting a menu item.

So actions generally don't receive input signals unless they are a tool or open their own window?

And if they open their own window, can they be fed info programmatically?

Eg: can I write a script that runs the oilpaint filter on the active document with brushsize set to 5 and smooth set to 20 without it opening its own window?

And if I can do that, how do I work out what parameters it needs and how to feed them to it?



More information about the kimageshop mailing list