Fixed minor bug
This commit is contained in:
+1
-1
@@ -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]
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user