From f4c523f1883754608b7a030bafbacedcda6f4a69 Mon Sep 17 00:00:00 2001 From: shinich39 <142449762+shinich39@users.noreply.github.com> Date: Mon, 23 Dec 2024 06:51:28 +0900 Subject: [PATCH] Bypass selected nodes (#2013) Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com> --- src/scripts/app.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/scripts/app.ts b/src/scripts/app.ts index 5464dc7fa..a59b62b92 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -590,9 +590,13 @@ export class ComfyApp { options.push({ content: 'Bypass', callback: (obj) => { - if (this.mode === LGraphEventMode.BYPASS) - this.mode = LGraphEventMode.ALWAYS - else this.mode = LGraphEventMode.BYPASS + const mode = + this.mode === LGraphEventMode.BYPASS + ? LGraphEventMode.ALWAYS + : LGraphEventMode.BYPASS + for (const item of app.canvas.selectedItems) { + if (item instanceof LGraphNode) item.mode = mode + } this.graph.change() } })