Allow director width and height input links
This commit is contained in:
@@ -12097,9 +12097,28 @@ app.registerExtension({
|
||||
setTimeout(refreshFromWidgets, 60);
|
||||
setTimeout(refreshFromWidgets, 250);
|
||||
|
||||
// Keep width/height as regular widgets on the node so they can be used like
|
||||
// standard Comfy fields instead of being panel-only controls.
|
||||
const ensureVisibleResolutionWidgets = () => {
|
||||
const isLiteGraph = !window.LiteGraph || !window.LiteGraph.vueNodesMode;
|
||||
for (const name of ["custom_width", "custom_height"]) {
|
||||
const w = getW(name);
|
||||
if (!w) continue;
|
||||
showWidget(w);
|
||||
if (isLiteGraph && w.type === "converted-widget" && node.inputs) {
|
||||
if (!node.inputs.find(i => i.name === name)) {
|
||||
const slot = node.addInput(name, "INT");
|
||||
if (slot != null) {
|
||||
const inp = node.inputs[node.inputs.length - 1];
|
||||
if (inp) inp.widget = { name };
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Keep width/height as regular widgets on the node while also allowing
|
||||
// them to behave as standard automation inputs.
|
||||
["frame_rate", "resize_method", "reference_strength"].forEach(n => { hideWidget(getW(n)); });
|
||||
ensureVisibleResolutionWidgets();
|
||||
ensureTimingHidden();
|
||||
};
|
||||
const settingsContainer = document.createElement("div");
|
||||
|
||||
Reference in New Issue
Block a user