How to remove loaded brushes?
I'm able to load patterns in a way where I can choose to load them appending to the current patterns or not.
When I want to update the patterns, I load the first pattern with appending on false, and the rest on true, resulting in the removal of all previous patterns, and loading the new ones.
I edited this pattern functions to work with brushes, the only thing that isn't working like it is with patterns is the appending function. It will always append, even on false.
Resulting in duplicate brush sets.
Is it posible to remove "all" brushes?
function cTID(s){
return app.charIDToTypeID(s);
};
function sTID(s){
return app.stringIDToTypeID(s);
};
function actionManagerLoadBrushFile(file, append){
// append: true / false
var d1 = new ActionDescriptor();
var r1 = new ActionReference();
r1.putProperty(cTID('Prpr'), sTID('brush'));
r1.putEnumerated(sTID('application'), sTID('ordinal'), cTID('Trgt'));
d1.putReference(sTID('null'), r1);
d1.putPath(cTID('T '), file);
d1.putBoolean(cTID('Appe'), append);
executeAction(cTID('setd'), d1, DialogModes.NO );
}
var brushFile = new File("/C/Brushes/Brushes.abr");
actionManagerLoadBrushFile(brushFile, false)
