Skip to main content
Participant
November 11, 2022
Open for Voting

Changing brush size with shortcut [ and ] with 1px increments in Phtoshop

  • November 11, 2022
  • 1 reply
  • 292 views

This works fine when the size is 1px to 10px, but only increases/decreases in increments of 5 pixels instead of 1 pixel after that. Please add the option to customize it throughout the brush size so no matter what size I'm at I can set a fixed increment for the shortcut for precise controls.
Thanks.

1 reply

Stephen Marsh
Community Expert
Community Expert
November 12, 2022

Digging around the forum I found this script:

 

setCurrentBrushSize(+1);

function setCurrentBrushSize(_size) {
    /*
    https://community.adobe.com/t5/photoshop-ecosystem-discussions/how-to-read-out-current-brush-size-in-javascript/td-p/8045339
    */
    var desc1 = new ActionDescriptor();
    var ref1 = new ActionReference();
    ref1.putEnumerated(charIDToTypeID('Brsh'), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));
    desc1.putReference(charIDToTypeID('null'), ref1);
    var desc2 = new ActionDescriptor();
    desc2.putUnitDouble(stringIDToTypeID("masterDiameter"), charIDToTypeID('#Pxl'), _size);
    desc1.putObject(charIDToTypeID('T   '), charIDToTypeID('Brsh'), desc2);
    executeAction(charIDToTypeID('setd'), desc1, DialogModes.NO);
}

 

 https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html