-
-
Save krin-san/f50e25e94188d895326b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resultText; | |
function run(){ | |
var layerSets = app.activeDocument.layerSets; | |
dumpLayerSets(layerSets); | |
dumpLayers(app.activeDocument.layers); | |
} | |
function dumpLayerSets(layerSets){ | |
var len = layerSets.length; | |
for(var i=0;i<len;i++){ | |
var layerSet = layerSets[i]; | |
dumpLayers(layerSet.artLayers); | |
} | |
alert (resultText) | |
} | |
function dumpLayers(layers){ | |
var len = layers.length; | |
for(var i=0;i<len;i++){ | |
var layer = layers[i]; | |
if(layer.kind==undefined){ | |
continue; | |
} | |
if(layer.kind == LayerKind.TEXT){ | |
var rowText = 'Text: '+ layer.textItem.contents +' -> ' + ', font: '+ layer.textItem.font +', font-size: ' + layer.textItem.size + ', color (RGB): ' + Math.round(layer.textItem.color.rgb.red)+', ' + Math.round(layer.textItem.color.rgb.green)+ ', ' + Math.round(layer.textItem.color.rgb.blue); | |
resultText = resultText + '\n' + rowText; | |
$.writeln(rowText); | |
} | |
} | |
} | |
run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment