mirror of
https://github.com/sbrow/ps.git
synced 2026-02-28 03:01:43 -05:00
WIP
This commit is contained in:
15
scripts/getLayerSet.jsx
Normal file
15
scripts/getLayerSet.jsx
Normal file
@@ -0,0 +1,15 @@
|
||||
#include lib.js
|
||||
|
||||
var stdout = newFile(arguments[0]);
|
||||
var set = eval(arguments[1]);
|
||||
stdout.writeln('{"Name": "'+set.name+'", "ArtLayers":[');
|
||||
for (var i = 0; i < set.artLayers.length; i++) {
|
||||
var lyr = set.artLayers[i];
|
||||
stdout.write(('{"Name":"' + lyr.name + '", "Bounds": [[' + lyr.bounds[0] + ',' +
|
||||
lyr.bounds[1] + '],[' + lyr.bounds[2] + ',' +
|
||||
lyr.bounds[3] + ']], "Visible": ' + lyr.visible + '}').replace(/ px/g, ""));
|
||||
if (i != set.artLayers.length - 1)
|
||||
stdout.writeln(",");
|
||||
}
|
||||
stdout.write("]}")
|
||||
stdout.close();
|
||||
Reference in New Issue
Block a user