真的是 photoshop 脚本的初学者。
现在我正在制作一些对我的工作流程有用的脚本,例如可见性切换内容。
我现在真正想知道的是如何使用 javascript 更改“图层混合模式”而不是“画笔模式”(如正常、乘法、清除等...)。我似乎找不到一些资源来控制画笔模式。
希望你们能帮我解决这个问题。
最佳答案
这是可能的,这是我拼凑的一个片段,它通过创建一个 Action 并执行它来工作。 (通常不能通过常规操作来更改画笔模式,但在 CC 2017 中确实可以这样做)
var bmsS = ["normal", "dissolve", "behind", "clearEnum",
"darken", "multiply", "colorBurn", "linearBurn", "darkerColor",
"lighten", "screen", "colorDodge", "linearDodge", "lighterColor",
"overlay", "softLight", "hardLight", "vividLight", "linearLight", "pinLight", "hardMix",
"difference", "exclusion", "blendSubtraction", "blendDivide",
"hue", "saturation", "color", "luminosity", ];
// Select the paint brush tool
var idslct = stringIDToTypeID( "select" );
var desc226 = new ActionDescriptor();
var idnull = stringIDToTypeID( "null" );
var ref170 = new ActionReference();
var idPbTl = stringIDToTypeID( "paintbrushTool" );
ref170.putClass( idPbTl );
desc226.putReference( idnull, ref170 );
executeAction( idslct, desc226, DialogModes.NO );
// blend mode
var desc = new ActionDescriptor();
var idset = stringIDToTypeID( "set" );
//alert(desc.getEnumerationValue(stringIDToTypeID("mode")));
desc.putEnumerated(stringIDToTypeID("mode"), stringIDToTypeID("blendModel"), stringIDToTypeID("clearEnum"));
desc226.putObject( stringIDToTypeID( "to" ), stringIDToTypeID( "null" ), desc);
executeAction( idset, desc226, DialogModes.NO );
关于javascript - Photoshop Javascript : How to Change the brush Mode with javascript?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44508493/