Plugin: Custom Brush Resize

Hello!

I made a Krita plugin a while ago and would like to share it with you all!

This plugin aims to give the artist slightly more control over the brush resizing in Krita when using a mouse button + keyboard key shortcut combination like the one used in Photoshop for resizing your brush.

You can download the plugin from here!.

Custom Brush Resize

The Custom Brush Resize plugin allows the user to configure how quickly the brush scales when using a mouse button + key board key shortcut combination.
This allows for the resizing to be as snappy or as slow as the artist would like.


Why?

A few artists and myself started using Krita. One of these artists pointed out that the brush scaling in Krita when using stylus together with a modifier key, was significantly slower than the way that they are used to coming from Photoshop. They asked if there was a to make it scale faster.
I thought to myself, “surely there must be a way!”, which led to the creation of the Custom Brush Resize plugin.

using_custom_brush_resize

Requirements

  • Required version of Krita: 5.2.2 or later

OS support

  • Windows (10, 11)
  • Linux (Has not been tested)
  • MacOS (Not planned as of now)
  • Android (Not planned as of now)

How to install this plugin

On Windows

To automatically install the this plugin on Windows, you can run the automatic_install.bat file.

If you would like to manually install the plugin, you can copy the custom_brush_resize folder and the custom_brush_resize.desktop file to the %APPDATA%\krita\pykrita folder.

Once the files have been copied you can launch Krita.

Enabling within Krita

Within Krita, you can go to Settings>Configure Krita>Python Plugin Manager, and make sure the check box for the Custom Brush Resize plugin is checked.

To display the Custom Brush Resize settings docker, you can go to Settings>Dockers and make sure the check box for the Custom Brush Resize Settings is checked.

This will display the settings docker widget on the right.

Plugin configuration

After enabling the plugin and the docker widget, you should see the settings within Krita.

There are 4 settings:

  • Maximum Brush Size
  • Minimum Brush Size
  • Resize Range Max
  • Shortcut

The Maximum Brush Size caps the size of the brush tool to the set value. Just like the Maximum Brush Size setting, the Minimum Brush Size setting, prevents the brush tool from going below the set brush size.

The Resize Range Max settings determines how far the stylus must move for the brush size to go from the Minimum Brush Size to the Maximum Brush Size brush size setting.

You can define a custom shortcut by clicking on the shortcut button and pressing the desired shortcut.

Note
Shortcuts are currently limited to a mouse button and keyboard key combinations.

How does it work?

This plugin will remap the current brush tool’s size to a smaller range, making it where the stylus does not have to move as far to increase and decrease the brush size.

The various settings give the user finer control of the brush scaling so it can be tweaked to the user’s taste.

The resizing of the brush is relative to the current set brush size. When the brush size is set to less than half of the Maximum Brush Size value, the stylus will have to move less than half of the distance to reach the Minimum Brush Sizevalue. The total distance that the stylus must move is configured using the Resize Range Max setting.

Limitations and Known Issues

As mentioned above, the shortcuts are limited to a mouse button and keyboard key combinations.

When using the Left mouse button within a shortcut, it will paint on the canvas before resizing due to the click being registered by Krita.

The diameter of the preview while resizing does not represent the actual diameter of the brush within the current document.

There is a visual bug where where both the Krita brush resize circle and the Custom Brush Resize resize circle are shown at the same time.

Special thanks!

Thank you to Brent Lecluyse for inspiring the creation of this plugin!

13 Likes

Hi! As an artist myself, I really wanted to try this plugin, but there’s an error that’s stopping me from enjoying it :cry:

First of all, I’m using Krita 5.2.9 and windows 11

I installed it both “automatically” (downloading the custom_brush_resize folder from github and then opening through Krita by Tools → Scripts → Import Python File from File as done with other plugins) and manually (revising the folder %APPDATA%\krita\pykrita with the respective file and folder).

The error is the following:

Traceback (most recent call last):

  File "C:\Users\user\AppData\Roaming\krita\pykrita\custom_brush_resize\extension\c_brush_resize_extension.py", line 31, in createActions
    data = read_from_json(SETTINGS_FILE)

  File "C:\Users\user\AppData\Roaming\krita\pykrita\custom_brush_resize\utils.py", line 70, in read_from_json
    with open(file_path) as _file:

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\user\\AppData\\Roaming\\c_resize_brush_dock\\settings\\c_resize_brush_dock.json'

Let me know if you need anything else!

1 Like

Hey @tuKrita_bb!

Thank you for trying the plugin and reporting this error!
This error should be resolved in the latest version of the plugin.
Please give it another try when you get the chance :slightly_smiling_face:.

2 Likes

I tested it again and it works! Yay!
Changing the brush size is way more comfortable and fluid now, thank you for making this plugin @Glee_moo.

Just one thing, there’s a small bug when I change any parameter like Maximum Brush Size, the value shifts disproportionately. However, I’ve noticed that I don’t modify them often so it doesn’t bother me too much. :+1:

Custom Cursor Resize Plugin GIF

1 Like

Hey @tuKrita_bb,
Thank you for trying it out again! I am glad you enjoy it!
I will see about adjusting the parameter sliders ^^.