@hertze
Like so many things in Photoshop scripting, I don’t believe that it is available via the DOM, which leaves AM code.
Spray Radius = 10
Smoothness = 5
spatterFilter(10, 5);
function spatterFilter(radiusValue, smoothnessValue) {
var idGEfc = charIDToTypeID( "GEfc" );
var desc533 = new ActionDescriptor();
var idGEfk = charIDToTypeID( "GEfk" );
var idGEft = charIDToTypeID( "GEft" );
var idspatter = stringIDToTypeID( "spatter" );
desc533.putEnumerated( idGEfk, idGEft, idspatter );
var idsprayRadius = stringIDToTypeID( "sprayRadius" );
desc533.putInteger( idsprayRadius, radiusValue );
var idsmoothness = stringIDToTypeID( "smoothness" );
desc533.putInteger( idsmoothness, smoothnessValue );
executeAction( idGEfc, desc533, DialogModes.NO );
}
EDIT: Another option to roughen is Pixelate > Crystallize
crystallizeFilter(3);
function crystallizeFilter(crystallizeValue) {
var idcrystallize = stringIDToTypeID( "crystallize" );
var desc569 = new ActionDescriptor();
var idcellSize = stringIDToTypeID( "cellSize" );
desc569.putInteger( idcellSize, crystallizeValue );
executeAction(idcrystallize, desc569, DialogModes.NO);
}