해결됨
Photoshop script to iterate through all layers and change shape stroke size!??!
Hello!
I'm trying to write a photoshop script that can change the size of strokes on all shape layers.
When we increase the image size, none of the stroke widths scale with that change. This is what we are trying to fix. Is there a way to increase image size and have stroke width also scale?
It seems super simple and I can do it in Adobe Animate really easily, but not photoshop.
So far I can get the stroke size of an active layer but not change it... (thanks to another great post)...
Please help!! 😮
var activeDoc = app.activeDocument;
var layers = activeDoc.layers;
var layerLength = layers.length;
//alert(layers.length);
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("AGMStrokeStyleInfo"));
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
//alert(executeActionGet(r).getObjectValue(stringIDToTypeID("AGMStrokeStyleInfo")).getUnitDoubleValue(stringIDToTypeID("strokeStyleLineWidth")));
var strokeSize = (executeActionGet(r).getObjectValue(stringIDToTypeID("AGMStrokeStyleInfo")).getUnitDoubleValue(stringIDToTypeID("strokeStyleLineWidth")));
alert(strokeSize);
strokeSize += 10;
