Introduction of Multi Float and Group Labels

Added in Multi Float Node.
Added in ability to add group labels between nodes
New UI settings like hide # labels, row gap sizes, improved settings layout
This commit is contained in:
Blueprint Coding
2025-02-21 18:06:58 -07:00
parent c9fbee143e
commit 84612badfb
7 changed files with 2452 additions and 542 deletions
+40
View File
@@ -0,0 +1,40 @@
class MultiFloatNodeAID:
@classmethod
def INPUT_TYPES(cls):
# Define up to 20 potential float inputs.
optional = {
f"value{i+1}": (
"FLOAT",
{
"default": 0.0,
"min": -3.4e38, # or another large negative float if needed
"max": 3.4e38, # or another large positive float if needed
"step": 0.1, # default step for float
"hide": True,
"forceInput": True,
},
)
for i in range(20)
}
return {
"required": {},
"optional": optional,
}
RETURN_TYPES = ("FLOAT",) * 20
RETURN_NAMES = tuple(f"f{i+1}" for i in range(20))
FUNCTION = "process"
CATEGORY = "AIDoc"
UI = "MultiFloatNodeAID" # This should match your JS filename for the node
def process(self, **kwargs):
outputs = []
for i in range(20):
key = f"value{i+1}"
val = kwargs.get(key, 0.0)
outputs.append(float(val))
return tuple(outputs)
NODE_CLASS_MAPPINGS = {"MultiFloatNodeAID": MultiFloatNodeAID}
NODE_DISPLAY_NAME_MAPPINGS = {"MultiFloatNodeAID": "🩺 Multi Float"}
+19 -6
View File
@@ -15,11 +15,24 @@ from .MultiIntNode import (
NODE_DISPLAY_NAME_MAPPINGS as MULTIINT_DISPLAY_NAME_MAPPINGS,
)
from .MultiText import (
NODE_CLASS_MAPPINGS as MULTITEXT_NODE_CLASS_MAPPINGS, # Import the class mappings for MultiText
NODE_DISPLAY_NAME_MAPPINGS as MULTITEXT_DISPLAY_NAME_MAPPINGS, # Import the display name mappings
from .MultiFloatNodeAID import (
NODE_CLASS_MAPPINGS as MULTIFLOAT_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as MULTIFLOAT_DISPLAY_NAME_MAPPINGS,
)
# Combine the mappings from both MultiInt and MultiText nodes
NODE_CLASS_MAPPINGS = {**MULTIINT_NODE_CLASS_MAPPINGS, **MULTITEXT_NODE_CLASS_MAPPINGS}
NODE_DISPLAY_NAME_MAPPINGS = {**MULTIINT_DISPLAY_NAME_MAPPINGS, **MULTITEXT_DISPLAY_NAME_MAPPINGS}
from .MultiText import (
NODE_CLASS_MAPPINGS as MULTITEXT_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as MULTITEXT_DISPLAY_NAME_MAPPINGS,
)
NODE_CLASS_MAPPINGS = {
**MULTIINT_NODE_CLASS_MAPPINGS,
**MULTIFLOAT_NODE_CLASS_MAPPINGS,
**MULTITEXT_NODE_CLASS_MAPPINGS,
}
NODE_DISPLAY_NAME_MAPPINGS = {
**MULTIINT_DISPLAY_NAME_MAPPINGS,
**MULTIFLOAT_DISPLAY_NAME_MAPPINGS,
**MULTITEXT_DISPLAY_NAME_MAPPINGS,
}
+2 -2
View File
@@ -9,7 +9,7 @@ export class SettingsPopup {
// Root popup
this.popupElement = document.createElement("div");
this.popupElement.style.position = "fixed";
this.popupElement.style.width = "250px";
this.popupElement.style.width = "350px";
this.popupElement.style.background = "#181818";
this.popupElement.style.border = "2px solid #4b3e72";
this.popupElement.style.borderRadius = "6px";
@@ -21,7 +21,7 @@ export class SettingsPopup {
// Header
this.headerElement = document.createElement("div");
this.headerElement.textContent = "Multi Int Node Settings";
this.headerElement.textContent = "Multi Node Settings";
this.headerElement.style.width = "100%";
this.headerElement.style.color = "#fff";
this.headerElement.style.fontSize = "14px";
File diff suppressed because it is too large Load Diff
+832 -531
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,4 +1,5 @@
{
"Multi Text": "Convenient way to manage multiple prompts or text strings in a singular node",
"Multi Int": "Allows the creation of up to 20 ints from one node with: custom step amounts per int, clicking edit pencil allows to set any value, clicking and dragging on int allows fast change by step, +- buttons step by the set value."
"Multi Int": "Allows the creation of up to 20 ints from one node with: custom step amounts per int, clicking edit pencil allows to set any value, clicking and dragging on int allows fast change by step, +- buttons step by the set value.",
"Multi Float": "Allows the creation of up to 20 floats from one node with: custom step amounts per float, clicking edit pencil allows to set any value, clicking and dragging on float allows fast change by step, +- buttons step by the set value."
}
+2 -2
View File
@@ -1,7 +1,7 @@
[project]
name = "The-AI-Doctors-Clinical-Tools"
description = "Nodes: Multi Int and Multi Text; allows for the creation of multiple int and multiple string storage and output from a single node. Multi Float coming soon."
version = "1.0.3"
description = "Nodes: Multi Int and Multi Text; allows for the creation of multiple int, floats and string storage and output from a single node."
version = "1.1.0"
license = {file = "LICENSE"}
dependencies = []