Rotate Brush Tip Extension
RotateBrushTip is an experimental Krita Extension that allows assigning shortcut for rotating brush tip.
It does this by walking down the elements in Brush Editor until it found the corresponding input for brush tip angle and assigning a value to that. Currently it rotates at 5 degree increment.
Its a bit hackish, there are some potential problem.
Idk how toggling brush outline on/off to makesure the preview updates work on other system with different brush preview/
Shortcut can be set here;
Changing the increment to your preferred one can be done if you edit the extension.
Just change the value here to your preferred value.
def rotate_tip_left(self):
self.set_brushRotValue(5)
self.reload()
def rotate_tip_right(self):
self.set_brushRotValue(-5)
self.reload()
Do tell me if it worked for you. Thank you.
It’s working in my system and I have bind it to one of my micropads encoder.
Note: For 5.2 and nightly
18 Likes
It looks great, but I made a mistake when using it
AttributeError
Python 3.8.1: C:\Program Files\Krita (x64)\bin\krita.exe
Tue Feb 7 16:46:30 2023
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
C:\Program Files\Krita (x64)\share\krita\pykrita\rotatebrushtip\rotatebrushtip.py in rotate_tip_left(self=<rotatebrushtip.rotatebrushtip.Rotatebrushtip object>)
43
44 def rotate_tip_left(self):
45 self.set_brushRotValue(5)
46 self.reload()
47
self = <rotatebrushtip.rotatebrushtip.Rotatebrushtip object>
self.set_brushRotValue = <bound method Rotatebrushtip.set_brushRotValue o...tebrushtip.rotatebrushtip.Rotatebrushtip object>>
C:\Program Files\Krita (x64)\share\krita\pykrita\rotatebrushtip\rotatebrushtip.py in set_brushRotValue(self=<rotatebrushtip.rotatebrushtip.Rotatebrushtip object>, rotationValue=5)
118
119 def set_brushRotValue(self, rotationValue):
120 container_info = self.selectBrushContainer("Brush Tip")
121 current_view = container_info["current_view"]
122 option_widget_container = container_info["option_widget_container"]
container_info undefined
self = <rotatebrushtip.rotatebrushtip.Rotatebrushtip object>
self.selectBrushContainer = <bound method Rotatebrushtip.selectBrushContaine...tebrushtip.rotatebrushtip.Rotatebrushtip object>>
C:\Program Files\Krita (x64)\share\krita\pykrita\rotatebrushtip\rotatebrushtip.py in selectBrushContainer(self=<rotatebrushtip.rotatebrushtip.Rotatebrushtip object>, br_property='Brush Tip')
78 def selectBrushContainer(self,br_property):
79 editor = self.get_brush_editor()
80 option_widget_container = editor.findChild(QWidget, 'frmOptionWidgetContainer')
81 current_view = None
82 selectedRow = None
option_widget_container undefined
editor = None
editor.findChild undefined
global QWidget = <class 'PyQt5.QtWidgets.QWidget'>
AttributeError: 'NoneType' object has no attribute 'findChild'
__cause__ = None
__class__ = <class 'AttributeError'>
__context__ = None
__delattr__ = <method-wrapper '__delattr__' of AttributeError object>
__dict__ = {}
__dir__ = <built-in method __dir__ of AttributeError object>
__doc__ = 'Attribute not found.'
__eq__ = <method-wrapper '__eq__' of AttributeError object>
__format__ = <built-in method __format__ of AttributeError object>
__ge__ = <method-wrapper '__ge__' of AttributeError object>
__getattribute__ = <method-wrapper '__getattribute__' of AttributeError object>
__gt__ = <method-wrapper '__gt__' of AttributeError object>
__hash__ = <method-wrapper '__hash__' of AttributeError object>
__init__ = <method-wrapper '__init__' of AttributeError object>
__init_subclass__ = <built-in method __init_subclass__ of type object>
__le__ = <method-wrapper '__le__' of AttributeError object>
__lt__ = <method-wrapper '__lt__' of AttributeError object>
__ne__ = <method-wrapper '__ne__' of AttributeError object>
__new__ = <built-in method __new__ of type object>
__reduce__ = <built-in method __reduce__ of AttributeError object>
__reduce_ex__ = <built-in method __reduce_ex__ of AttributeError object>
__repr__ = <method-wrapper '__repr__' of AttributeError object>
__setattr__ = <method-wrapper '__setattr__' of AttributeError object>
__setstate__ = <built-in method __setstate__ of AttributeError object>
__sizeof__ = <built-in method __sizeof__ of AttributeError object>
__str__ = <method-wrapper '__str__' of AttributeError object>
__subclasshook__ = <built-in method __subclasshook__ of type object>
__suppress_context__ = False
__traceback__ = <traceback object>
args = ("'NoneType' object has no attribute 'findChild'",)
with_traceback = <built-in method with_traceback of AttributeError object>
The above is a description of an error in a Python program. Here is
the original traceback:
Traceback (most recent call last):
File "C:\Program Files\Krita (x64)\share\krita\pykrita\rotatebrushtip\rotatebrushtip.py", line 45, in rotate_tip_left
self.set_brushRotValue(5)
File "C:\Program Files\Krita (x64)\share\krita\pykrita\rotatebrushtip\rotatebrushtip.py", line 120, in set_brushRotValue
container_info = self.selectBrushContainer("Brush Tip")
File "C:\Program Files\Krita (x64)\share\krita\pykrita\rotatebrushtip\rotatebrushtip.py", line 80, in selectBrushContainer
option_widget_container = editor.findChild(QWidget, 'frmOptionWidgetContainer')
AttributeError: 'NoneType' object has no attribute 'findChild'
Ah yes, this is a known one.
wait for a sec - let me check if i have push an update that works on both 5.1 and 5.2.
[this is due to the renaming of the popup frame, to kispopupframe.
Thank you very much,Could you set combination shortcut keys,For example, shift key and shortcut key can rotation value ten times
1 Like
I’ll look into quickly adding that while im at it.
can you try it now?
For 10 degree you need to set your own shortcut in configure shortcut
3 Likes
I just installed and tried it. This plug-in works very well. Thank you very much.
1 Like
your welcome,
I hope the next time I update - its native inside krita. 
Are you ok with 10 degree increment? I personally prefer 5 or 15 because of 45. 
2 Likes
In the new Photoshop, press the left and right keys of the keyboard to rotate the brush tip by 1 degree. Press and hold the shift key and the shortcut key, and the rotation angle is 10 times.
One advantage of photoshop is that this shortcut key only takes effect when the brush tool or eraser tool is selected.
Krita can customize the rotation angle, which is also great.
1 Like
Thanks for this extension. It works well as far as I can tell. It would be nice if there is a way to customize the degrees manually.
It is possible to customize. Or add customization.
I just not have done an extension with ui , time is a bit limited lately so I havent studied how to best approach that.
When i get some time i will sit down and study that.
4 Likes
Hi, it seems the addon is broken in the new krita version 5.2.0, each time i hit the hotkey for rotate brush tip 10 degree, the tip rotated but the brush size also increase by a huge amount.
If possible id love to have this plugin working again, it’s very useful in my day to day work.
I’m using PopOS appimage version of krita.
Thank you !
1 Like
Im sad to hear that. I have not have time to update my krita but shucks i use this extension alot so gotta check that out asap.
Edit: I checked and its working on windows. Ill see if i can setup a vm with popOs over the weekend.
3 Likes
Hi again, thank you very much for your hard work!
Upon reading your updated comment, i tried to look at the problem again, and it seems this bug is brush specific. In the video below the plugin work perfectly with the first 2 brushes, but it breaks on the 3rd brush:
This is the brush in question, its a default krita brush that i use a lot:

Hope this help !
1 Like
a bit unfortunate that base on your posting hours and mine that we probably are 8 to 12hrs of timezone away.
I apologize in advance that i cant answer immediately.
- I did a few test and I think the issue issue is the brush tip itself.
- I tested g) Dry Bristles and it works well until I switch its tip to Rake Flat [ the tip f) Bristle Flat 5 uses]
it only happen with rake flat tip,
- as soon as i switch f) Bristle Flat 5 tip to a different tip from rake_flat to like rake_sparse it doesnt happen anymore.
this eliminates that the issue is in the engine or the auto tips.
so right now the problematic tip is rake_flat.
after manually checking a random set of tips, some of them do some of them dont.
– I have a suspect line of code ; i will see if its the issue.
4 Likes
No need to apologize at all - i’m very thankful for your work on this free plugin in the first place! I live in SEA but i work weird hours hence the posting time.
While i would love to move to 5.2 as soon as possible, the plugin works perfectly fine on 5.1.5 so i’m staying in that version for now, please don’t feel pressure on responding immediately!
If you continue to have issues with 5.2, maybe its best to use the new api that doesn’t require hacking around the gui:
3 Likes
Thank you for this . ill make sure to review and see if i can port Rotate Brush Tip and CBT with this API 
2 Likes
They finally added official rotate brush tip keyboard shortcuts in krita 5.2.2, i can now move on from 5.1.5 haha.
Thank you @kaichi1342 for everything ! Your plugins help me a lot through out the year !
4 Likes
Yep - I’m really happy to see that.
After all this extension is meant only as a stop gap and proof. I’d like to think that this extension prove that there are significant number who uses rotate tip actively. That it needed it’s own shortcut.
Now we can do it with native - without the hacky way I did here. ^-^.
The new engine I think will open for developments for other plugin in terms of brush control.
4 Likes