Modify Brush Angle

I’m currenty creating a shortcut plugins.
Is there any way to modify get and set current brush angle with python plugins?

1 Like

You do it through pyqt5.
You need a tablet event check and then pass the event to tilt.x() and tilt.y.(). However it is not that precise or consistent.

I’m not 100% sure what you mean. My guess is the static brush tip angle you can also set from the popup palette’s “brush HUD” panel?

If so, I’m afraid there is currently no way to access it from Python.
Those properties are specific to each brush engine btw., not every engine has an angle setting.

To access those, the Python API would need to extend the resource access beyond the generic Resource class wrapper so you can access the KisPaintOpPreset specific methods/classes.

3 Likes

That would be cool, actually.

2 Likes

Sorry. Yes I did forget to mention the tilt I made was localized into a docker where I had access. Not painting on the canvas is should have specified the situation first.

Thanks for the replies.
I spent hours reading documentation and source trying to figure out how to make more properties accessible to python. but as expected I don’t understand anything at all.
so I made this plugin instead.
It just plugin that switches between duplicates of preset with different properties.
It is stupid but it works, I guess.