I’d like to create a tool (such as magic wand, pipet tool, etc). This tool needs an active current document.
So when the user executes my script, I’d like to :
change mouse cursor (optional)
get next user mouse left click
a) if the click was on the current document : retrieve document pixel coordinates and consume the click event,
b) if the click wasn’t on drawing (like if the user selects another tool, etc) : not consume user input
Is it possible from scripter ? Or from a python plugin ?
I couldn’t find any info in the libkis documentation or in other plugins, so any lead would be welcome
Ok, thanks. It there another common way ? Like may be create a plugin in C++ ? Or it will only be a special krita build but not a sharable plugin in the end ?
Yes, you can write tools as plugins in C++: all tools in Krita are, technically, plugins. But those plugins need to be built for every platform separately.