The Photoshop Brush Controller is a free script for Adobe Photoshop (Windows only versions) written by Marco Traverso.
It allows to control the brush size, opacity and flow values by pressing the CTRL + Right Mouse Button and dragging the mouse.
- Right > Increases Brush Size
- Left > Decreases Brush Size
- Up > Adjusts the opacity value
- Down > Adjusts the flow value
The standard tool for sketching and painting in Adobe Photoshop is the Brush Tool. Even if a wide range of standard and customizable brushes is available, it is still very useful to adjust the brush diameter size while painting without changing the brush itself.
Up to the current CS3 version, this was possible in several different ways:
- by adjusting the slider on the top option bar
- by right-clicking the mouse and adjusting the slider in the pop-up dialog
- by using the keyoboard shortcuts (Increase / Decrease Brush Size)
It is also possible, when using a graphic tablet, to assign the brush diameter parameter to the pen pressure or pen tilt: however it can be more convenient to use the pen pressure to control only the opacity, and moreover it can be useful to have more precise control on the brush size.
One of the new features of Photoshop CS4 is the ability to vary the brush size by clicking the Ctrl +Alt + Left Button and dragging the mouse (see this video)
The following script allows to have a similar control even in the previous versions of Photoshop (the ones that support the keyboard shortcuts), and also allows to adjust the opacity and flow parameters.
Note: being based on AutoHotKey, a Windows-only free utility, the Brush Controller script works only on Windows systems. Anyway the same principle could be adopted to create a similar script in OSx environments.
How it works
Once the script is running in the background, the control is activated with the combination CTRL+Right Mouse Button (the combination is customizable).
While keeping the button pressed, the mouse can be moved in four directions/areas:
- Right > Increase Brush Size – when the cursor is moved to the right beyond the same predefined value, the script sends the increase brush size keyboard shortcut repeatedly. While the mouse is kept in this area with the button pressed down, the brush size keeps increasing.
- Left > Decrease Brush Size – when the cursor is moved to the left beyond a predefined value, the script send the decrease brush size keyboard shortcut repeatedly. While the mouse is kept in this area with the button pressed down, the brush size keeps decreasing.
- Up > Brush Opacity Controller: if the mouse is moved upwards beyond a predefined value, the script starts sending the number keys 1,2,3 … 0 that control the opacity value. The numbers are sent depending on the mouse position, so the upper is the cursor, the higher the value (up until 0, ie.e. 100%).
- Down > Brush Flow Controller: in the same way, if the mouse cursor is moved down, the script sends the Shift+number keys combination which controls the flow value.
Note: the CTRL button can be released once the mouse button is pressed.
The PS Brush Size Controller comes as a zipped archive that includes three files:
- PS Brush Size Controller.ini
The .ini file contains the settings used by the controller – such as the keyboard shortcuts, sensitivity ecc. See below for customization
- PS Brush Size Controller.ahk
The .ahk file contains the code of the script, and requires AutoHotKey.
- PS Brush Size Controller.exe
The .exe file is a compiled version of the script, which doesn’t require the installation of AutoHotKey.
To install the script:
- Unzip the files in the same directory (the location is not important)
- Open the .ini file in a text editor and check that the increase/decrease shortcuts correspond to the ones you are using in Photoshop – see customization below
- Run the .exe or – if you have AutoHotKey installed – the .ahk file
You can also copy a link to the script file in the Startup folder of the start menu, so that it will run automatically when Windows starts.
The script was tested in Adobe Photoshop CS3 only. It should work on previous versions, anyway if you have some problems just send us an email and we’ll try to fix it.
- The controller also works with other brush-based tools such as eraser, burn, dodge, etc.
- Since this is not a native Photoshop command, the CTRL+ Right Button combination starts the controller even when a brush tool is not selected. This disables the default effect of the combination in Photoshop – for example when pressing CTRL+Right Button a layers selection menu opens.
- The effect described above has to be considered when a different combination is selected in the settings file. For example if the activation is set to CTRL+Left Mouse Button, this will disable the relative function – for example the multiple layers selection, the move tool shortcut and the layer mask selection shortcut. So a less used combination is preferable.
- The Photoshop Brush Controller is released under the GNU General Public License.
The script comes with a .ini settings file which can be edited in a normal text editor to change the following parameters:
- brush_increase_size_hotkey is the shortcut for Increase Brush Size (Photoshop default= ‘ ] ‘ )
- brush_decrease_size_hotkey is the shortcut for Decrease Brush Size (Photoshop default = ‘ [ ‘ )
- Activation_Hotkey and mouse_button set the combination of keys / mouse button that starts the Brush Controller.
The default is Ctrl + Right Mouse Button.
It is possible to specify a custom combination, using ! for ‘Alt’, ^ for Ctrl, # for the Windows key, + for Shift, LButton for Left Mouse Button, RButton for the Right Mouse Button.
For example the lines:
Activation_Hotkey = ^!
mouse_button = RButton
set the activation hotkey to Ctrl + Alt + Right mouse button
- min_x_offset sets the horizontal offset of the brush resize areas – the defaul values is 1
- y_tolerance sets the height of the the brush resize control area
- min_y_offset sets the vertical offset of the opacity/flow control areas
- x_tolerance sets the height of the the brush resize control area
- y_mag_factor sets the height of the flow/opacity control areas
- x_slp, y_slp set the refresh time of the script for the brush size (x) and opacity and flow (y) controls