Skip to main content
Participant
September 5, 2022
Question

rotate

  • September 5, 2022
  • 3 replies
  • 1054 views

Help me how can I random rotate, random size of BRUSH that I specify. Because I need to make a large number of PSD files and don't want a hundred images to use the same brush but only a certain place.

3 replies

Participating Frequently
July 6, 2025

That's a great question! If you're working with a large number of PSD files and want each brush to have a random rotation and size, you can achieve this by using a combination of Photoshop scripting and custom brush dynamics. Under Brush Settings, enable Shape Dynamics and set the Angle Jitter and Size Jitter to Control Random. This will allow your brush to change size and angle automatically as you paint. For automation across multiple files, using a Photoshop script or action with randomization functions could help apply variation without manually editing each one. 

Trevor.Dennis
Community Expert
Community Expert
July 7, 2025
quote

 Under Brush Settings, enable Shape Dynamics and set the Angle Jitter and Size Jitter to Control Random


By @Happymod_APK2321

 

???

Legend
September 5, 2022

 

var s2t = stringIDToTypeID,
 minAngle = -90, maxAngle = 180,
 minDiameter = 10, maxDiameter = 200;
(r = new ActionReference()).putEnumerated(s2t("brush"), s2t('ordinal'), s2t('targetEnum'));;
(d = new ActionDescriptor()).putReference(s2t("target"), r);
(d1 = new ActionDescriptor()).putInteger(s2t('angle'), minAngle + Math.random() * (maxAngle - minAngle));
d1.putUnitDouble( s2t("masterDiameter"), s2t("pixelsUnit"), minDiameter + Math.random() * (maxDiameter - minDiameter) )
d.putObject(s2t("to"), s2t("target"), d1);
executeAction(s2t("set"), d, DialogModes.NO);

 

Participant
September 6, 2022

Thanks guys. But resize working, but rotate brush not working with this scrip guys

Legend
September 6, 2022

try this:

 var s2t = stringIDToTypeID,
 minAngle = -90, maxAngle = 180,
 minDiameter = 10, maxDiameter = 200;

(r = new ActionReference()).putProperty(s2t('property'), p = s2t('currentToolOptions'));
r.putEnumerated(s2t('application'), s2t('ordinal'), s2t('targetEnum'));
var tool = executeActionGet(r).getObjectValue(p),
 brush = tool.getObjectValue(s2t('brush'));

brush.putInteger(s2t('angle'), minAngle + Math.random() * (maxAngle - minAngle));
brush.putUnitDouble(s2t("diameter"), s2t("pixelsUnit"), minDiameter + Math.random() * (maxDiameter - minDiameter))
tool.putObject(s2t('brush'), s2t('computedBrush'), brush);

(r = new ActionReference()).putClass(s2t(currentTool));
(d = new ActionDescriptor()).putReference(s2t("target"), r);
d.putObject(s2t("to"), s2t("target"), tool);
executeAction(s2t("set"), d, DialogModes.NO);
PECourtejoie
Community Expert
Community Expert
September 5, 2022

Hi, in your Brush Settings panel (select if in the windows menu if it is not showing), click on the Shape Dynamics text, and increase thesize jitter and Angle Jitter sliders.

Note that if you are using a graphic tablet, you can use the pressure or the tilt of the pen to vary the settings.

Each dab of the brush should generate brush print of a different angle or size.

see: https://helpx.adobe.com/uk/photoshop/using/creating-modifying-brushes.html

and: https://www.youtube.com/watch?v=so4A8eOCQRc

 

PECourtejoie
Community Expert
Community Expert
September 5, 2022

I see that you selected the scripting tag, are you looking for a way to automate it, or was that tag selected by accident?

Participant
September 5, 2022

I have mostly PSD files, and want to do action random rotate, random size of BRUSH min ... max.... As a result all my PSD files run on the same brush, but it's different due to factors The factor on random is different for each file. You know what I mean?