Can now save and load from json

Much improved speed over loading everything manually.
This commit is contained in:
Unknown
2018-03-22 20:11:51 -04:00
parent daac5bf3d2
commit 5b36b9193a
8 changed files with 264 additions and 90 deletions

View File

@@ -0,0 +1,2 @@
#include lib.js
var stdout = newFile(arguments[0]);stdout.writeln(app.activeDocument.name);stdout.close();

View File

@@ -2,7 +2,7 @@
var stdout = newFile(arguments[0]);
var lyr = eval(arguments[1]);
stdout.writeln(('{"Name":"' + lyr.name + '", "Bounds": [[' + lyr.bounds[0] + ',' +
stdout.writeln(('{"Name":"' + lyr.name + '","Bounds":[[' + lyr.bounds[0] + ',' +
lyr.bounds[1] + '],[' + lyr.bounds[2] + ',' +
lyr.bounds[3] + ']], "Visible": ' + lyr.visible + '}').replace(/ px/g, ""));
lyr.bounds[3] + ']],"Visible":' + lyr.visible + '}').replace(/ px/g, ""));
stdout.close();

2
scripts/isVisible.jsx Normal file
View File

@@ -0,0 +1,2 @@
#include lib.js
var stdout = newFile(arguments[0]);stdout.writeln(eval(arguments[1]).visible);stdout.close();