|
import { RgthreeBaseVirtualNodeConstructor } from "typings/rgthree.js";
|
|
import { app } from "scripts/app.js";
|
|
import { NodeTypesString } from "./constants.js";
|
|
import { BaseFastGroupsModeChanger } from "./fast_groups_muter.js";
|
|
|
|
|
|
|
|
|
|
export class FastGroupsBypasser extends BaseFastGroupsModeChanger {
|
|
static override type = NodeTypesString.FAST_GROUPS_BYPASSER;
|
|
static override title = NodeTypesString.FAST_GROUPS_BYPASSER;
|
|
override comfyClass = NodeTypesString.FAST_GROUPS_BYPASSER;
|
|
|
|
static override exposedActions = ["Bypass all", "Enable all", "Toggle all"];
|
|
|
|
protected override helpActions = "bypass and enable";
|
|
|
|
override readonly modeOn = LiteGraph.ALWAYS;
|
|
override readonly modeOff = 4;
|
|
|
|
constructor(title = FastGroupsBypasser.title) {
|
|
super(title);
|
|
this.onConstructed();
|
|
}
|
|
}
|
|
|
|
app.registerExtension({
|
|
name: "rgthree.FastGroupsBypasser",
|
|
registerCustomNodes() {
|
|
FastGroupsBypasser.setUp();
|
|
},
|
|
loadedGraphNode(node: FastGroupsBypasser) {
|
|
if (node.type == FastGroupsBypasser.title) {
|
|
node.tempSize = [...node.size];
|
|
}
|
|
},
|
|
});
|
|
|