// Version: 2016.9.15
// Set the options for the paint brush tool
// blend modes, opacity, flow and others
if (documents.length == 0) {
var d = documents.add();
} else {
var d = activeDocument;
}
// two layers so behind and clear are available
if (d.layers.length == 1) {
d.artLayers.add();
}
// Select the paint brush tool
var d = new ActionDescriptor()
var r = new ActionReference();
r.putClass( stringIDToTypeID( "paintbrushTool" ) );
d.putReference( stringIDToTypeID( "null" ), r );
executeAction( stringIDToTypeID( "select" ), d, DialogModes.NO );
// 29 blend modes for paint brush in CC 2015.5
var bmsS = ["normal", "dissolve", "behind", "clearEnum",
"darken", "multiply", "colorBurn", "linearBurn", "darkerColor",
"lighten", "screen", "colorDodge", "linearDodge", "