Shortcut to rotate brush

Is it because it isn’t compatible with 5.2? I saw a video of it. It’d be useful if it worked.

That seems to be the case.

Michelist

1 Like

Hi guys, so I took a stab at this and wrote a proof of concept implementation. It seems to work for the standard freehand brush, but it definitely requires more work and testing as there are several other types of brushes (like spray) that probably need specific handling. Here’s how it looks in this basic state:

The new hotkeys can be assigned in Painting group

I assigned them to K and L. Once on canvas, you can press or hold the key to keep rotating in one or the other direction. I used a 4 degree increment to make it a bit faster. Maybe it could be modified to toggle between a small and a large increment with a SHIFT or something.

rotating_brush

The rotation is visible in the brush editor and can be reset same as other brush settings.

Let me know if you have feedback, especially regarding the ideal hotkey behavior. Once I refine it, I could open a PR. For now, I put the WIP code on a branch here.

6 Likes

Great job already. Thanks.

Alright, the PR is up - Add brush tip rotate actions (!1967) · Merge requests · Graphics / Krita · GitLab

On the UX side, I ended up adding 4 actions (hotkeys), to rotate the brush either quickly (by 15 degrees) or precisely (by 1 degree). It works for the Krita brushes (pixel engine) and MyPaint. There are some niche engines that I left out, but these don’t seem to benefit from the rotation too much, if at all.

8 Likes

Hey thanks for making this change. This was really requested by people elsewhere too. I hope the merge request is merged soon, from the comments made by @dkazakov there are no major issues with it

1 Like

I don’t want to get too ahead of myself, but assuming it gets merged to master, should I work next on:

  • a cherry pick to 5.2 branch (for a next bugfix release – master is 5.3)
  • anything needed to expose it for Android? (I recall it has a special UI with big buttons)

Thanks.

Can the “rotation angle” be exposed to Python API?

That would allow to finally add it as a mouse tracker and pie menu in my Shortcut Composer - as well as in all the other plugins.

1 Like

Are actions (string identifiers for action/hotkey) exposed to Python automatically? Can you share a link to the code that makes use of an existing action? I can check if it would work. Thanks for the suggestion.

I believe that krita actions are automatically exposed to python, available under action name as string.

What I meant is creating “getBrushRotation()” and “setBrushRotation()” methods in the View class - similarily to opacity, flow, blending mode etc.

1 Like

Perfect, thank you. I’ll try to get that implemented as well.

3 Likes

That would be amazing. Thank you and good luck :slight_smile:

I think you can ask for opinion on the merge request. I do not know about it :slight_smile:

I think this is a feature, not a bugfix - it has to wait for 5.3 to be released

Done :slight_smile:

I will open this PR after the current one is merged.

4 Likes

I would like to ask a somewhat off topic question: since we have a universal shortcut key for rotate brush, can we also have a universal “brush option slider” for rotate brush?

1 Like

Hi, but that request is to have a whole new docker UI with these sliders, right? Brush angle is already available in the Brush HUD (right click popup). I think a docker like this would be perfect for a Python plugin.

If I misunderstood your idea, maybe share a mock-up or try to describe what it would do exactly. Thanks.

For me, it sounds like the wish to have a brush option slider 5, like those for size, opacity, flow and pattern that already exist, and the mock-up shows that.

Michelist

Add/Edit: But I remember that there were requests for such a docker too.

Oh, on top of the main window? Ok, I get it now. But I don’t see flow in there. Maybe it’s configurable, I never really explored this area of the UI. I’ll look around.

1 Like

We can change/set up the brush option sliders via the downward arrow in front of them, it opens a drop-down menu where a click on the + changes the slider to that option.

Currently we can select four of them.
config_toolbars_brush-option-sliders

Michelist

3 Likes