Summary: | Document Krita actions for Python plugins | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | keyth_qcfx2 <keyth2363214> |
Component: | Scripting | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | halla, scottpetrovic, tamtamy.tymona |
Priority: | NOR | ||
Version: | 4.2.8 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Other | ||
Latest Commit: | Version Fixed In: |
Description
keyth_qcfx2
2020-03-25 01:31:41 UTC
oh it seems I can ask Krita if the Eraser mode is turned on by doing this: """ Application.action("KritaShape/KisToolBrush").trigger() kritaEraserAction = Application.action("erase_action") state = kritaEraserAction.isChecked() if state is False: # Eraser is OFF kritaEraserAction.trigger() """ But that does raise the question are there more commands like this? and where can I see them? I really just stumbled upon this on another person addon because there is no where to be read about commands like this that I know of, and I am actively searching for information everywhere. However I fixed the Eraser but I made it worse with this command forcing a lock on the brush tool and I dont know understand it... I just made a copy paste because there is no acctual info. Where can I find info about this sort of stuff? There are a lot of actions. You can inspect them with the actions() function of the Krita class. They aren't documented, though... There is a new Krita scripting site in the works that is almost launched. There is an action dictionary where you can search all the actions that are available. I think once that site goes live we can close this ticket. I am going to close this for now. You can see all the actions and search them from the scripting site now ... https://scripting.krita.org/action-dictionary If anything else comes up we can make a new ticket. |