批量播放

文档 社区

技能解读

当前原文的自动摘译,尚未人工审校。

4.4 仍需要批量播放的操作

这些操作没有专用工具 - 使用execute_batchplay: 灯光效果: VIVID_LIGHT 混合模式(set_layer_properties 不支持): 按 ID 选择图层: 反转图层像素(不是选择):

4.5 过滤器可写性表

滤镜 · 无头(无对话框) · 注释 所有标准滤镜 · 是 · 高斯模糊、波浪、风等。 模糊库 · 可能强制对话 · 已知的 Adobe bug Camera Raw 滤镜 · 否 · 始终需要对话框。使用曲线/级别代替液化(全网格)·否·仅liquify_forward无头工作

4.6 事件代码表

模糊:gaussianBlur、motionBlur、radialBlur、smartBlur、surfaceBlur、lensBlur、blurbTransform 扭曲:波浪、旋转、球化、极地、波纹、海洋波纹、收缩、剪切、zigZag、置换、玻璃 风格化:风、浮雕、findEdges、漫反射、diffuseGlow、glowingEdges、瓷砖、挤出、日光化 草图:chrome、浅浮雕、粉笔木炭、木炭、影印、邮票、撕边、水纸、记事纸、石膏、网状、半色调图案、图形笔

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
文档
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
94 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@00bx · MIT
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# §4 BATCHPLAY REFERENCE

Use this section ONLY when no dedicated tool exists for your operation (Rule R7).

## 4.1 DESCRIPTOR FORMAT

```javascript
[
  {
    _obj: "commandName", // Event string code (required)
    _target: [{ _ref: "layer", _id: 5 }], // Target (optional)
    paramName: value, // Simple value
    enumParam: { _enum: "enumType", _value: "enumValue" }, // Enum
    unitParam: { _unit: "pixelsUnit", _value: 10.0 }, // Unit value
  },
];
```

## 4.2 REFERENCE FORMS

```javascript
{_ref: "layer", _id: 42}                                    // By ID (best)
{_ref: "layer", _enum: "ordinal", _value: "targetEnum"}     // Active layer
{_ref: "document", _enum: "ordinal", _value: "targetEnum"}  // Active document
{_ref: "channel", _enum: "channel", _value: "RGB"}          // RGB composite
```

## 4.3 UNIT TYPES

```javascript
{_unit: "pixelsUnit", _value: 10}      // Pixels
{_unit: "percentUnit", _value: 50}     // Percentage
{_unit: "angleUnit", _value: 90}       // Degrees
{_unit: "densityUnit", _value: 72}     // PPI
```

## 4.4 OPERATIONS THAT STILL NEED BATCHPLAY

These operations have NO dedicated tool — use execute_batchplay:

**Lighting Effects:**

```json
[
  {
    "_obj": "lightingEffects",
    "lightList": [
      {
        "_obj": "lightSource",
        "lightType": { "_enum": "lightType", "_value": "spotLight" },
        "intensity": 50,
        "focus": 60,
        "posX": 500,
        "posY": 300
      }
    ]
  }
]
```

**VIVID_LIGHT blend mode** (not supported by set_layer_properties):

```json
[
  {
    "_obj": "set",
    "_target": [
      { "_ref": "layer", "_enum": "ordinal", "_value": "targetEnum" }
    ],
    "to": {
      "_obj": "layer",
      "mode": { "_enum": "blendMode", "_value": "vividLight" }
    }
  }
]
```

**Select layer by ID:**

```json
[
  {
    "_obj": "select",
    "_target": [{ "_ref": "layer", "_id": 42 }],
    "makeVisible": false
  }
]
```

**Invert layer pixels (not selection):**

```json
[{ "_obj": "invert" }]
```

## 4.5 FILTER SCRIPTABILITY TABLE

| Filter               | Headless (no dialog) | Notes                                             |
| -------------------- | -------------------- | ------------------------------------------------- |
| All standard filters | Yes                  | gaussianBlur, wave, wind, etc.                    |
| Blur Gallery         | May force dialog     | Known Adobe bug                                   |
| Camera Raw Filter    | No                   | Always requires dialog. Use Curves/Levels instead |
| Liquify (full mesh)  | No                   | Only `liquify_forward` works headless             |
| Neural Filters       | No                   | Cloud-based, requires dialog                      |

## 4.6 EVENT CODE TABLE

**Blur:** gaussianBlur, motionBlur, radialBlur, smartBlur, surfaceBlur, lensBlur, blurbTransform
**Distort:** wave, twirl, spherize, polar, ripple, oceanRipple, pinch, shear, zigZag, displace, glass
**Stylize:** wind, emboss, findEdges, diffuse, diffuseGlow, glowingEdges, tiles, extrude, solarize
**Sketch:** chrome, basRelief, chalkCharcoal, charcoal, photocopy, stamp, tornEdges, waterPaper, notePaper, plaster, reticulation, halftonePattern, graphicPen
**Artistic:** plasticWrap, dryBrush, filmGrain, fresco, neonGlow, paletteKnife, paintDaubs, roughPastels, smudgeStick, sponge, underpainting, watercolor, posterEdges, coloredPencil, cutout
**Noise:** addNoise, despeckle, dustAndScratches, median, reduceNoise
**Sharpen:** sharpen, unsharpMask, highPass, smartSharpen
**Render:** clouds, $DrfC (diff clouds), lensFlare, fibers/$Fbrs
**Texture:** craquelure, grain, mosaicPlugin, patchwork, stainedGlass, texturizer
**Pixelate:** colorHalftone, crystallize, facet, fragment, mezzotint, mosaic, pointillize
**Brush Strokes:** accentedEdges, angledStrokes, crosshatch, darkStrokes, inkOutlines, spatter, sprayedStrokes, sumi_e
**Operations:** make, set, get, delete, select, move, duplicate, hide, show, transform, crop, canvasSize, imageSize
**Adjustments:** curves, levels, hueSaturation, colorBalance, brightnessEvent, channelMixer, selectiveColor, posterization, thresholdClassEvent, invert, desaturate, gradientMapEvent

---

# §16 BATCHPLAY PRO TIPS

**Record your own descriptors:**

1. Open Photoshop Actions panel
2. Record the effect manually
3. Panel flyout → "Copy As JavaScript"
4. Gives exact descriptor for `execute_batchplay`

**Action listener (captures descriptors in real-time):**

```javascript
action.addNotificationListener(["all"], (event, descriptor) => {
  console.log(event, descriptor);
});
```

---

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。