File size: 1,010 Bytes
4450790 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
import { app } from "../../scripts/app.js";
import { NodeTypesString } from "./constants.js";
import { BaseFastGroupsModeChanger } from "./fast_groups_muter.js";
export class FastGroupsBypasser extends BaseFastGroupsModeChanger {
constructor(title = FastGroupsBypasser.title) {
super(title);
this.comfyClass = NodeTypesString.FAST_GROUPS_BYPASSER;
this.helpActions = "bypass and enable";
this.modeOn = LiteGraph.ALWAYS;
this.modeOff = 4;
this.onConstructed();
}
}
FastGroupsBypasser.type = NodeTypesString.FAST_GROUPS_BYPASSER;
FastGroupsBypasser.title = NodeTypesString.FAST_GROUPS_BYPASSER;
FastGroupsBypasser.exposedActions = ["Bypass all", "Enable all", "Toggle all"];
app.registerExtension({
name: "rgthree.FastGroupsBypasser",
registerCustomNodes() {
FastGroupsBypasser.setUp();
},
loadedGraphNode(node) {
if (node.type == FastGroupsBypasser.title) {
node.tempSize = [...node.size];
}
},
});
|