Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Has been cancelled
Execution Tests / test (macos-latest) (push) Has been cancelled
Execution Tests / test (ubuntu-latest) (push) Has been cancelled
Execution Tests / test (windows-latest) (push) Has been cancelled
Test server launches without errors / test (push) Has been cancelled
Unit Tests / test (macos-latest) (push) Has been cancelled
Unit Tests / test (ubuntu-latest) (push) Has been cancelled
Unit Tests / test (windows-2022) (push) Has been cancelled
Includes 30 custom nodes committed directly, 7 Civitai-exclusive loras stored via Git LFS, and a setup script that installs all dependencies and downloads HuggingFace-hosted models on vast.ai. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
58 lines
1.3 KiB
JavaScript
58 lines
1.3 KiB
JavaScript
import { app } from "../../../scripts/app.js";
|
|
import { $el } from "../../../scripts/ui.js";
|
|
|
|
const id = "pysssss.LinkRenderMode";
|
|
const ext = {
|
|
name: id,
|
|
async setup(app) {
|
|
if (app.extensions.find((ext) => ext.name === "Comfy.LinkRenderMode")) {
|
|
console.log("%c[🐍 pysssss]", "color: limegreen", "Skipping LinkRenderMode as core extension found");
|
|
return;
|
|
}
|
|
const setting = app.ui.settings.addSetting({
|
|
id,
|
|
name: "🐍 Link Render Mode",
|
|
defaultValue: 2,
|
|
type: () => {
|
|
return $el("tr", [
|
|
$el("td", [
|
|
$el("label", {
|
|
for: id.replaceAll(".", "-"),
|
|
textContent: "🐍 Link Render Mode:",
|
|
}),
|
|
]),
|
|
$el("td", [
|
|
$el(
|
|
"select",
|
|
{
|
|
textContent: "Manage",
|
|
style: {
|
|
fontSize: "14px",
|
|
},
|
|
oninput: (e) => {
|
|
setting.value = e.target.value;
|
|
app.canvas.links_render_mode = +e.target.value;
|
|
app.graph.setDirtyCanvas(true, true);
|
|
},
|
|
},
|
|
LiteGraph.LINK_RENDER_MODES.map((m, i) =>
|
|
$el("option", {
|
|
value: i,
|
|
textContent: m,
|
|
selected: i == app.canvas.links_render_mode,
|
|
})
|
|
)
|
|
),
|
|
]),
|
|
]);
|
|
},
|
|
onChange(value) {
|
|
app.canvas.links_render_mode = +value;
|
|
app.graph.setDirtyCanvas(true);
|
|
},
|
|
});
|
|
},
|
|
};
|
|
|
|
app.registerExtension(ext);
|