Add VACE Mode Select node for integer-based mode selection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 19:15:42 +01:00
parent 85acb6d326
commit 508f2ec404
3 changed files with 70 additions and 0 deletions

31
mode_select_node.py Normal file
View File

@@ -0,0 +1,31 @@
from .nodes import VACE_MODES
class VACEModeSelect:
"""Select a VACE mode by integer index (0-9)."""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"index": ("INT", {"default": 0, "min": 0, "max": len(VACE_MODES) - 1, "step": 1}),
},
}
RETURN_TYPES = (VACE_MODES,)
RETURN_NAMES = ("mode",)
FUNCTION = "select"
CATEGORY = "VACE Tools"
def select(self, index):
index = max(0, min(index, len(VACE_MODES) - 1))
return (VACE_MODES[index],)
NODE_CLASS_MAPPINGS = {
"VACEModeSelect": VACEModeSelect,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"VACEModeSelect": "VACE Mode Select",
}