feat: AI套图分层方案 + Gemini集成 - 4种图案类型处理 + 正片叠底 + 宽高比 + 模型选择

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-07 16:59:56 +08:00
parent 12395d8eca
commit dae906aba7
277 changed files with 15009 additions and 19922 deletions

View File

@@ -0,0 +1,24 @@
function saveAsPSD(saveFolder) {
var doc = app.activeDocument; // 获取当前文档
if (doc == null) {
alert("没有打开的文档!");
return;
}
var fileName = doc.name.replace(/\.[^\.]+$/, ''); // 移除文件扩展名
var saveFile = File(saveFolder + "/" + fileName + ".psd"); // 创建保存路径
var d = new ActionDescriptor();
var d1 = new ActionDescriptor();
d1.putBoolean(stringIDToTypeID("maximizeCompatibility"), true);
d.putObject(stringIDToTypeID("as"), stringIDToTypeID("photoshop35Format"), d1);
d.putPath(stringIDToTypeID("in"), new File(saveFile));
d.putInteger(stringIDToTypeID("documentID"), 2027);
d.putBoolean(stringIDToTypeID("lowerCase"), true);
d.putEnumerated(stringIDToTypeID("saveStage"), stringIDToTypeID("saveStageType"), stringIDToTypeID("saveSucceeded"));
executeAction(stringIDToTypeID("save"), d, DialogModes.NO);
}