Copy link to clipboard
Copied
Hello,
can anyone help me with a script that changes the style of the art history brush (e.g: dab, tight short....)?
I figured it out:
function setArtHistoryBrushStyle(style) {
if (style === undefined) style = 6;
var ref = new ActionReference();
ref.putProperty(stringIDToTypeID("property"), stringIDToTypeID("currentToolOptions"));
ref.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var fullDesc = executeActionGet(ref);
var cto = fullDesc.getObjectValue(stringIDToTypeID("currentToolOptions"));
cto...
Copy link to clipboard
Copied
I figured it out:
function setArtHistoryBrushStyle(style) {
if (style === undefined) style = 6;
var ref = new ActionReference();
ref.putProperty(stringIDToTypeID("property"), stringIDToTypeID("currentToolOptions"));
ref.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
var fullDesc = executeActionGet(ref);
var cto = fullDesc.getObjectValue(stringIDToTypeID("currentToolOptions"));
cto.putInteger(charIDToTypeID("AHBs"), style);
var desc = new ActionDescriptor();
var refTarget = new ActionReference();
refTarget.putClass(stringIDToTypeID("artBrushTool"));
desc.putReference(stringIDToTypeID("target"), refTarget);
desc.putObject(stringIDToTypeID("to"), stringIDToTypeID("currentToolOptions"), cto);
executeAction(stringIDToTypeID("set"), desc, DialogModes.NO);
return true;
}
Find more inspiration, events, and resources on the new Adobe Community
Explore Now