Revert "Hide bar-driven widgets from node bodies (JS only; Python untouched)"

This reverts commit 54c3ad01aa.
This commit is contained in:
PozzettiAndrea
2026-08-14 14:21:57 +02:00
parent 54c3ad01aa
commit 4b5486076a
5 changed files with 28 additions and 76 deletions
-24
View File
@@ -74,30 +74,6 @@ export function createFullscreenButton(container) {
return btn;
}
/**
* Permanently hide node input widgets that are driven by a control bar
* instead. The widgets keep existing (their values still serialize into the
* workflow and flow to Python as inputs) -- they just stop being drawn on the
* node body, so the bar is the single visible control.
*
* @param {Object} node - The LiteGraph node
* @param {string[]} names - Widget names to hide
*/
export function hideWidgets(node, names) {
let changed = false;
for (const nm of names) {
const w = node.widgets?.find((x) => x.name === nm);
if (w && w.type !== "geometrypack_hidden") {
w._gpOrigType = w.type;
w._gpOrigComputeSize = w.computeSize;
w.type = "geometrypack_hidden"; // unknown type -> not drawn
w.computeSize = () => [0, -4];
changed = true;
}
}
if (changed) node.setSize(node.computeSize());
}
/**
* Create an info panel for displaying mesh metadata
* @param {string} placeholder - Initial placeholder text