验收20%

This commit is contained in:
2026-07-16 07:42:07 +08:00
parent 0dec90ffdd
commit cb25317412
108 changed files with 6477 additions and 1308 deletions
@@ -0,0 +1,38 @@
#target photoshop
app.displayDialogs = DialogModes.NO;
var openedDocument = null;
function readJson(filePath) {
var file = File(filePath);
if (!file.exists) {
throw new Error('Manifest does not exist: ' + filePath);
}
file.encoding = 'UTF8';
if (!file.open('r')) {
throw new Error('Unable to open manifest: ' + filePath);
}
var content = file.read();
file.close();
return eval('(' + content + ')');
}
try {
var manifest = readJson(JIAPU_A01_MANIFEST);
var psdFile = File(JIAPU_A01_PSD);
if (!psdFile.exists) {
throw new Error('PSD does not exist: ' + psdFile.fsName);
}
openedDocument = app.open(psdFile);
if (manifest.exports.length !== 0) {
throw new Error('Layer export is not implemented until assets are approved.');
}
openedDocument.close(SaveOptions.DONOTSAVECHANGES);
openedDocument = null;
} catch (error) {
if (openedDocument !== null) {
openedDocument.close(SaveOptions.DONOTSAVECHANGES);
}
throw error;
}