This commit is contained in:
pythongosssss
2026-01-27 19:41:03 -08:00
parent 946aea1f47
commit 67f366d734
3 changed files with 92 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ from .nodes import (
NodeWithUnionInput, NodeWithUnionInput,
NodeWithValidation, NodeWithValidation,
NodeWithV2ComboInput, NodeWithV2ComboInput,
NodeWithDynamicCombo,
ObjectPatchNode, ObjectPatchNode,
RemoteWidgetNode, RemoteWidgetNode,
RemoteWidgetNodeWithControlAfterRefresh, RemoteWidgetNodeWithControlAfterRefresh,
@@ -55,6 +56,7 @@ __all__ = [
"NodeWithUnionInput", "NodeWithUnionInput",
"NodeWithValidation", "NodeWithValidation",
"NodeWithV2ComboInput", "NodeWithV2ComboInput",
"NodeWithDynamicCombo",
"ObjectPatchNode", "ObjectPatchNode",
"RemoteWidgetNode", "RemoteWidgetNode",
"RemoteWidgetNodeWithControlAfterRefresh", "RemoteWidgetNodeWithControlAfterRefresh",

View File

@@ -22,6 +22,7 @@ from .inputs import (
NodeWithUnionInput, NodeWithUnionInput,
NodeWithValidation, NodeWithValidation,
NodeWithV2ComboInput, NodeWithV2ComboInput,
NodeWithDynamicCombo,
SimpleSlider, SimpleSlider,
NODE_CLASS_MAPPINGS as inputs_class_mappings, NODE_CLASS_MAPPINGS as inputs_class_mappings,
NODE_DISPLAY_NAME_MAPPINGS as inputs_display_name_mappings, NODE_DISPLAY_NAME_MAPPINGS as inputs_display_name_mappings,
@@ -81,6 +82,7 @@ __all__ = [
"NodeWithUnionInput", "NodeWithUnionInput",
"NodeWithValidation", "NodeWithValidation",
"NodeWithV2ComboInput", "NodeWithV2ComboInput",
"NodeWithDynamicCombo",
"ObjectPatchNode", "ObjectPatchNode",
"RemoteWidgetNode", "RemoteWidgetNode",
"RemoteWidgetNodeWithControlAfterRefresh", "RemoteWidgetNodeWithControlAfterRefresh",

View File

@@ -303,6 +303,91 @@ class NodeWithV2ComboInput:
return (combo_input,) return (combo_input,)
class NodeWithDynamicCombo:
"""
Test node with DynamicCombo that shows/hides widgets based on selection.
"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"first_widget": (
"INT",
{},
),
"dynamic_combo": (
"COMFY_DYNAMICCOMBO_V3",
{
"options": [
{
"key": "none",
"inputs": {"required": {}},
},
{
"key": "one",
"inputs": {
"required": {
"w1": (
"INT",
{},
),
}
},
},
{
"key": "two",
"inputs": {
"required": {
"w1": (
"INT",
{},
),
"w2": (
"INT",
{},
),
}
},
},
{
"key": "three",
"inputs": {
"required": {
"w1": (
"INT",
{},
),
"w2": (
"INT",
{},
),
"w3": (
"INT",
{},
),
}
},
},
],
},
),
"last_widget": (
"INT",
{},
),
}
}
RETURN_TYPES = ("INT",)
FUNCTION = "execute"
CATEGORY = "DevTools/Testing"
DESCRIPTION = "Test node for dynamic combo widget behavior"
def execute(self, **kwargs):
print(kwargs)
return (1,)
NODE_CLASS_MAPPINGS = { NODE_CLASS_MAPPINGS = {
"DevToolsLongComboDropdown": LongComboDropdown, "DevToolsLongComboDropdown": LongComboDropdown,
"DevToolsNodeWithOptionalInput": NodeWithOptionalInput, "DevToolsNodeWithOptionalInput": NodeWithOptionalInput,
@@ -318,6 +403,7 @@ NODE_CLASS_MAPPINGS = {
"DevToolsNodeWithSeedInput": NodeWithSeedInput, "DevToolsNodeWithSeedInput": NodeWithSeedInput,
"DevToolsNodeWithValidation": NodeWithValidation, "DevToolsNodeWithValidation": NodeWithValidation,
"DevToolsNodeWithV2ComboInput": NodeWithV2ComboInput, "DevToolsNodeWithV2ComboInput": NodeWithV2ComboInput,
"DevToolsDynamicComboNode": NodeWithDynamicCombo,
} }
NODE_DISPLAY_NAME_MAPPINGS = { NODE_DISPLAY_NAME_MAPPINGS = {
@@ -335,6 +421,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"DevToolsNodeWithSeedInput": "Node With Seed Input", "DevToolsNodeWithSeedInput": "Node With Seed Input",
"DevToolsNodeWithValidation": "Node With Validation", "DevToolsNodeWithValidation": "Node With Validation",
"DevToolsNodeWithV2ComboInput": "Node With V2 Combo Input", "DevToolsNodeWithV2ComboInput": "Node With V2 Combo Input",
"DevToolsDynamicComboNode": "Dynamic Combo Node",
} }
__all__ = [ __all__ = [
@@ -352,6 +439,7 @@ __all__ = [
"NodeWithSeedInput", "NodeWithSeedInput",
"NodeWithValidation", "NodeWithValidation",
"NodeWithV2ComboInput", "NodeWithV2ComboInput",
"NodeWithDynamicCombo",
"NODE_CLASS_MAPPINGS", "NODE_CLASS_MAPPINGS",
"NODE_DISPLAY_NAME_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS",
] ]