-
Notifications
You must be signed in to change notification settings - Fork 56
/
makeAllStrokesRound.jsx
38 lines (33 loc) · 1.15 KB
/
makeAllStrokesRound.jsx
1
//Changes all selected Shape Layers stroke Join to Round//CC-BY, Nik Ska, 2016var makeAllStrokesRound = this;makeAllStrokesRound.go = function(){ var strokeName = "ADBE Vector Graphic - Stroke"; var cycleGroups = function(_group){ if(_group.matchName == strokeName){ _group.property("ADBE Vector Stroke Line Join").setValue(2); _group.property("ADBE Vector Stroke Line Cap").setValue(2); } else{ if(_group.numProperties > 0){ for(var p = 1; p <= _group.numProperties; p++){ cycleGroups(_group.property(p)); } } } } var activeComp = app.project.activeItem; if(activeComp && activeComp instanceof CompItem){ var sel = activeComp.selectedLayers; if(sel.length > 0){ app.beginUndoGroup("Making Strokes Round"); for(var s = 0; s < sel.length; s++){ if(sel[s] instanceof ShapeLayer){ cycleGroups(sel[s].property("ADBE Root Vectors Group")); } } app.endUndoGroup(); } }}makeAllStrokesRound.go();