Brush kind tools: spacing is always 25% by script
When I try to put the spacing of any brush type tool, it gets all the values but not the Spacing value [1-1000]
Is it a bug?
For example, when I try to put 2% has spacing value, the result will be always 25%. The same happens when I try other values. The result is 25%
Diameter,Hardness,Angle,Roundness,Flipy,Flipx are working well, but not Spacing
setBrushFeatures(130, 40,undefined,undefined,2,undefined,undefined);
function setBrushFeatures (Diameter,Hardness,Angle,Roundness,Spacing,Flipy,Flipx) {
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var appDesc = executeActionGet(ref);
var toolDesc = appDesc.getObjectValue(stringIDToTypeID('currentToolOptions'));
var brushDesc = toolDesc.getObjectValue(stringIDToTypeID('brush'));
if (Diameter == undefined) Diameter = brushDesc.getDouble(stringIDToTypeID('diameter'));
if (Hardness == undefined) Hardness = brushDesc.getDouble(stringIDToTypeID('hardness'));
if (Angle == undefined ) Angle = brushDesc.getDouble(stringIDToTypeID('angle'));
if (Roundness == undefined) Roundness = brushDesc.getDouble(stringIDToTypeID('roundness'));
if (Spacing == undefined) Spacing = brushDesc.getDouble(stringIDToTypeID('spacing'));
if (Flipy == undefined) Flipy = brushDesc.getBoolean(stringIDToTypeID('flipY'));
if (Flipx == undefined) Flipx = brushDesc.getBoolean(stringIDToTypeID('flipX'));
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID( "Brsh" ), charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
desc.putReference( charIDToTypeID( "null" ), ref );
var desc1 = new ActionDescriptor();
desc1.putDouble(stringIDToTypeID('diameter'), Diameter);
desc1.putDouble(stringIDToTypeID('hardness'), Hardness);
desc1.putDouble(stringIDToTypeID('angle'), Angle);
desc1.putDouble(stringIDToTypeID('roundness'), Roundness);
desc1.putDouble(stringIDToTypeID('spacing'), Spacing); // ?????????????? Allways 25% !!
desc1.putBoolean(stringIDToTypeID('flipY'), Flipy);
desc1.putBoolean(stringIDToTypeID('flipX'), Flipx);
desc.putObject( stringIDToTypeID('to'), charIDToTypeID( "Brsh" ), desc1 );
executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
}
