Hi, i really like using a brush slider under the cursor (like in PS) and did a workaround for it on Krita using autohotkey for Windows, here’s it working:
Basically i’m using a separated toolbar just for the slider, and i’m using autohotkey to move it under my cursor when i press a key, and back to it’s original position when i release the mouse left button (stylus from screen).
Here’s my code for autohotkey if anyone is interested:
Autohotkey code
I want to know if anyone with experience in Krita plugins could tell me if this is something possible to implement on a Plugin? Basically create a new window with Brush Slider, similar to what KanvasBuddy do, but under the cursor, and close it when you click outside the window.
I prefer to stick to the standard shortcut Shift + LMB + then move the stylus (or mouse) on the canvas to the left or right. So I immediately see the resizing of the brush on the canvas, something that is covered by the slider for small brush sizes.
But I’m sure that some will like your slider.
Thanks Michelist, i would use it too if it wasn’t for the fact that i need to move the stylus so much for it to change the size, going from 5px size to 500 px size i need to slide my stylus across more than half of my 16 inch screen to change it, and i change brush size all the time on my workflow.
The same function in Photoshop and Clip Studio Paint are way more sensitive, and need way less movement, do you have any ideia if its possible to change this sensitiveness?
But i like the slider way, once you memorize the size pattern you can go exactly to the size you want with the slider too, faster than the other way i dare to say.
Yes @KnowZero , any suggestions? i know nothing about Krita coding.
I haven’t heard of such an option to adjust this sensitivity. And I don’t need big movements, I think it is because I use large canvases. The smaller the canvas, the bigger the needed movement to adjust your brush.
It is like I said, some will want it. Or they will even need it for a better UX in their use cases.
Krita already had something similar as native function.
Accessible thru right click. And you can change the size of the brush as well as some other things.
@Michelist I tested different canvas sizes and it did not made a difference, what did made difference was Zoom Level, the more zoom the less movement i needed, so maybe 4k monitors need to made less movement, for me now it’s great to change smaller brushes sizes, but going from a small brush to a big one i need to make a big movement. @novames00 I’m aware of this option, but I want something simple and under my cursor to very quickly click making little movement to change it as possible, the one on the pop pallet is very far from when you open it and i need to “search” for it in my screen every time o open it.
Thank you very much @KnowZero, i will take a try.
I have adjusted the drag-resize response on my own build of Krita, currently it is linear. A logarithmic response seems better to me, so the brush size change is expressed more in terms of multiples of the current size.
I should try to get my tweaks merged in I guess, however I don’t think a single setting will please everyone, so I’m still tweaking it…
Yes, that’s a known issue for the Shift+drag resize. Somehow, the gesture sometime is just slow on certain devices (relative to dpi? screen size?), and sometime too quick with certain brush presets too (eg. y)_Wood_Texture_Fiber will resize extremely quickly).
The slider feature is nice, but maybe this is a workaround response in regards the Shift+Drag resize bugs. Maybe the Shift+Drag resize also needs to indicate the size as a number.
Yes, it’s probably a good idea that might ease selecting large brush size.
I don’t know what you mean by “search for it” but, here’s how it happens for me : everytime I right-click, say with one of the buttons of my pens for instance, the brush size panel is always there, not far from my cursor if I already extended it using the corresponding UI button the first time.
In addition to this, I can use two shortcut key to increase/decrease brush size directly.
So, on my side, it’s not that necessary to have a plugin like this one again.
Thus I think Krita’s popup palette is very ergonomic. But, yeah, I’m speaking for myself.
@novames00 I’m saying that i have to look for it when i open the pop pallet, this take like a second, also depending on the position i am on the screen if i open it, it goes off screen.
I change brush size a lot of times each minute on my workflow to be clear, this time can stack up and make several minutes on a bigger paintings, i want it to be just like the video i uploaded, which i did slow just to show but normally i change it instantly since i already memorized the size pattern.
@Deevad Thanks for the info! Yeah the brush you mentioned goes very fast, and it looks like it has to do with the brush tip attached to it, once i change to a round tip it goes back to be slow, the @hulmanen idea seems interesting, do you mind uploading your build? would like to test it.
Hope this issue can be addressed some time.
@KnowZero sorry but could you help me? i just find examples on how to make buttons, not to import the slider of QDoubleSpinBox, i don’t seem to get it’s implementation right. Also for a shortcut for the dialog, just need to do a .action file with the same name as my script folder right? found some info about it on docs.krita.org. The way you did for it to be a pop up under the cursor it’s already great. Thanks!.
That’s perfect, exactly what i wanted, Thank you! i just needed to changed to mainToolBar because that’s were my brush slider is at.
Could you help me connect it to the .action i created?
Here’s the code of it:
code
<?xml version="1.0" encoding="UTF-8"?>
<ActionCollection version="2" name="Scripts">
<Actions category="Scripts">
<text>Brush Slider Under Cursor</text>
<Action name="BrushSlider">
<icon></icon>
<text>Brush Slider Under Cursor</text>
<whatsThis>A Brush slider under your cursor when you press the shortcut</whatsThis>
<toolTip></toolTip>
<iconText></iconText>
<activationFlags>10000</activationFlags>
<activationConditions>0</activationConditions>
<shortcut></shortcut>
<isCheckable>false</isCheckable>
<statusTip></statusTip>
</Action>
</Actions>
</ActionCollection>
Also i created the .desktop file, placed this .py script together with a _ini _.py with “from .BrushSliderUnderCursor import *” in a folder to test and it created the psycache folder and everything and appeared in Krita but it is grey out do you have any ideia why? it was’nt grey out before i placed the _ini _.py file. Sorry i really know nothing about all this.
You can make it search all toolbars just in case later on you change your mind where to keep it:
qwin = Krita.instance().activeWindow().qwindow()
for toolbar in qwin.findChildren(QToolBar):
for spinbox in toolbar.findChildren(QDoubleSpinBox):
if spinbox.findChild(QLineEdit).text().startswith('Size: '):
self.oldparent = spinbox.parent()
self.spinbox = spinbox
You can run krita from krita.com instead of exe to see startup errors.
Or you can take the lazy way out since all you have is a single command via shortcut by using TenScripts.
I did not know about TenScripts, thank you for everything, i will share it later on the plugin subforum under your credit in case anyone find it usefu too.
Appreciate it a lot!
@Deevad@hulmanen@Michelist@novames00 A updated on the Shift+Drag resize issue, i found out it is related to the Maximum Brush Size Setting, when changed from the default 1000 pixel to like 5000 Max pixel size, the brushes need WAY less drag movement to Resize and much better to use in my opinion, now I’m actually preferring it instead of the brush slider under cursor.
@AxelFar I can make an appimage, though it’ll take me a while to have the time to set that up again - I’m not able to make a windows build unfortunately. If you can build your own Krita, I can post the changes I’ve made to the code - it’s pretty simple.
i would like something like this but for a more sensitive mouse size slider since i use shift and pen for bigger size changes. couldn’t we just make a docker and use the new docker under cu’rsor plugin?