feat: AI套图分层方案 + Gemini集成 - 4种图案类型处理 + 正片叠底 + 宽高比 + 模型选择
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
42
PSMARK代码块/删除图层.jsx
Normal file
42
PSMARK代码块/删除图层.jsx
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
function 删除图层3()
|
||||
{
|
||||
app.activeDocument.suspendHistory("delete layer", "删除图层2()");
|
||||
}
|
||||
|
||||
|
||||
function 删除图层2()
|
||||
{
|
||||
图层选择()
|
||||
删除图层()
|
||||
}
|
||||
function 图层选择() //
|
||||
{
|
||||
|
||||
var d = new ActionDescriptor();
|
||||
var r = new ActionReference();
|
||||
r.putName(stringIDToTypeID("layer"), "图层 2");
|
||||
d.putReference(stringIDToTypeID("null"), r);
|
||||
d.putBoolean(stringIDToTypeID("makeVisible"), false);
|
||||
var list = new ActionList();
|
||||
list.putInteger(3);
|
||||
d.putList(stringIDToTypeID("layerID"), list);
|
||||
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);
|
||||
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function 删除图层() //删除图层
|
||||
{
|
||||
|
||||
var d = new ActionDescriptor();
|
||||
var r = new ActionReference();
|
||||
r.putEnumerated(stringIDToTypeID("layer"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
|
||||
d.putReference(stringIDToTypeID("null"), r);
|
||||
var list = new ActionList();
|
||||
list.putInteger(3);
|
||||
d.putList(stringIDToTypeID("layerID"), list);
|
||||
executeAction(stringIDToTypeID("delete"), d, DialogModes.NO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user