About krita internals

Boudewijn Rempt boud at valdyas.org
Wed Dec 13 09:01:45 UTC 2017


On Tue, 12 Dec 2017, Brendan Scott wrote:

> using <action>.trigger()?

Yes.

> 
> > 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?
> 

Ah, no -- actions are separate from tools.

> 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?

You wouldn't do that using actions, but using the Filter class. You can set the configuration as a key-value map. Maybe it would be better to use the xml configuration format for that? You can see the xml from the the filter dialog. That also shows the filter parameters.

-- 
Boudewijn Rempt | http://www.krita.org, http://www.valdyas.org


More information about the kimageshop mailing list