Fixed minor bug

This commit is contained in:
drago87
2026-02-22 05:28:21 +01:00
parent 17c89aee52
commit 28c6353636
2 changed files with 25 additions and 18 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "Dragos-SceneBuilder"
description = "This node pack offers various ways to build json strings that is ment to be used with a LLM to generate Prompts. It also have a node that can load different prompts so that a LLM can use the json string to make the Image Prompt."
version = "1.0.1"
version = "1.0.2"
license = { file = "LICENSE" }
[project.urls]
+24 -17
View File
@@ -219,23 +219,30 @@ async function rebuild(node) {
//
// ADD THIS BLOCK
//
let jsonWidget = node.widgets.find(w => w.name === "json_data");
if (!jsonWidget)
{
jsonWidget = node.addWidget(
"text",
"json_data",
"",
() => {},
{ multiline: true }
);
jsonWidget.hidden = true;
}
const data = buildNestedObjectFromWidgets(node);
jsonWidget.value = JSON.stringify(data);
const data = buildNestedObjectFromWidgets(node);
let jsonWidget = node.widgets.find(w => w.name === "json_data");
if (!jsonWidget)
{
jsonWidget = node.addWidget(
"text",
"json_data",
"",
() => {}
);
// Fully hide visually and from layout
jsonWidget.hidden = true;
jsonWidget.computeSize = () => [0, -8];
jsonWidget.draw = () => {};
}
jsonWidget.value = JSON.stringify(data);
// Also store in properties for persistence safety
node.properties = node.properties || {};
node.properties.json_data = jsonWidget.value;
//
// END BLOCK
//