Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions dev_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,26 @@ def INPUT_TYPES(cls):
def node_with_string_input(self, string_input: str):
print(f"string_input: {string_input}")

class NodeWithAdvancedWidgets:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"advanced_combo": (("a", "b"), { "advanced": True, "default": "b" }),
"normal_widget": ("INT", { "default": 1 },),
"advanced_int": ("INT", { "advanced": True, "default": 2, }),
"advanced_text": ("STRING", { "advanced": True, "default": "z" }),
}
}

RETURN_TYPES = ()
FUNCTION = "node_with_advanced_widgets"
CATEGORY = "DevTools"
DESCRIPTION = "A node with advanced widgets"

def node_with_advanced_widgets(self, advanced_combo: str, normal_widget: int, advanced_int: int, advanced_text: str):
print(f"values: {advanced_combo}, {normal_widget}, {advanced_int}, {advanced_text}")


NODE_CLASS_MAPPINGS = {
"DevToolsErrorRaiseNode": ErrorRaiseNode,
Expand All @@ -186,6 +206,7 @@ def node_with_string_input(self, string_input: str):
"DevToolsNodeWithOutputList": NodeWithOutputList,
"DevToolsNodeWithForceInput": NodeWithForceInput,
"DevToolsNodeWithStringInput": NodeWithStringInput,
"DevToolsNodeWithAdvancedWidgets": NodeWithAdvancedWidgets,
}

NODE_DISPLAY_NAME_MAPPINGS = {
Expand All @@ -199,4 +220,5 @@ def node_with_string_input(self, string_input: str):
"DevToolsNodeWithOutputList": "Node With Output List",
"DevToolsNodeWithForceInput": "Node With Force Input",
"DevToolsNodeWithStringInput": "Node With String Input",
"DevToolsNodeWithAdvancedWidgets": "Node With Advanced Widgets",
}