I'm working on a addon that has a custom active tool in the viewport. This tool is supposed to allow you to do basic texture painting, while at the same time doing some other stuff.
My problem is, that I'm not aware of a way to make the active tool able to do texture painting. I know that there is some python api for texture painting, but that seems to only work in Texture Paint mode, which I don't want to access because my active tool is in object mode.
So here's the question: How do I get my custom active tool to allow the user to do texture painting on a selected texture?