fix(plugin): 图片处理动作只在 ref 节点出现(不再挂 gen/out/layer)

- image-annotate 1.0.2 / white-bg-800 1.0.1 / xianyi-cutout 1.0.2

- 产图节点一个可能有多张结果或多个图层,getNodeImage 只能取 result[0],漂浮菜单里放「编辑图片」会被误读成「编辑结果图」;先「复制/插入为参考图节点」

- 命令面板通道不受影响(仍可显式调用)
This commit is contained in:
qiqi committed 2026-10-30 11:02:18 +08:00
1 parent 9e09a48285
commit 75876f92be
10 files changed
+17 -14

No files matched your search

+4 -2
View File
@@ -94,10 +94,12 @@ export function createGlue(ctx, css) {
})
}
// 图片承载类型:ref / out(参考实现同款)+ gen / layer(宿主 isImageProducer 认定的产图类型)。
// 只在图片输入节点(ref)暴露:out/gen/layer 是产图节点,一个节点可能有多张结果或多个图层,
// getNodeImage 只能取 result[0],在漂浮菜单里放"编辑图片"会被误读成"编辑结果图"。
// 产图节点要处理图片,先「复制 / 插入为参考图节点」。
function appliesTo(node) {
if (!node) return false
return node.type === 'ref' || node.type === 'out' || node.type === 'gen' || node.type === 'layer'
return node.type === 'ref'
}
ctx.nodeActions.register({