Skip to content

Instantly share code, notes, and snippets.

@hysysk
Last active January 30, 2017 04:19
Show Gist options
  • Save hysysk/ad773f6b07392fe414fcc201d3fa1828 to your computer and use it in GitHub Desktop.
Save hysysk/ad773f6b07392fe414fcc201d3fa1828 to your computer and use it in GitHub Desktop.
Convert All Photoshop TextItem to Shape
var layers = app.activeDocument.layers;
convertToShapeLayer(layers);
function convertToShapeLayer(layers) {
for(var i=0,layersLength=layers.length; i<layersLength; i++) {
var layer = layers[i];
if(layer.typename == "LayerSet") {
convertToShapeLayer(layer.layers);
} else {
if(layer.kind == LayerKind.TEXT) {
layer.textItem.convertToShape();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment