Add dynamicInputs = FALSE nodes

The comments on the original PR suggested it'd be nice to have nodes with dynamicInputs set to False for both of the String nodes.  As such, I've created a dedicated node, and set the other string constants to dynamicInputs = True.
This commit is contained in:
Thomas Ward 2024-09-24 12:24:08 -04:00 committed by GitHub
parent 4b2020b213
commit 6bfe8ba1f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -50,7 +50,7 @@ class ConstantString(_CONSTANT_BASE):
def INPUT_TYPES(s) -> dict:
return {
"required" : {
"value": ("STRING", {"multiline": False})
"value": ("STRING", {"multiline": False, "dynamicPrompts": True})
}
}
@ -63,7 +63,33 @@ class ConstantStringMultiline(_CONSTANT_BASE):
def INPUT_TYPES(s) -> dict:
return {
"required": {
"value": ("STRING", {"multiline": True})
"value": ("STRING", {"multiline": True, "dynamicPrompts": True})
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("string",)
class ConstantNonDynamicString(_CONSTANT_BASE):
@classmethod
def INPUT_TYPES(s) -> dict:
return {
"required" : {
"value": ("STRING", {"multiline": False, "dynamicPrompts": False})
}
}
RETURN_TYPES = ("STRING",)
RETURN_NAMES = ("string",)
class ConstantNonDynamicStringMultiline(_CONSTANT_BASE):
@classmethod
def INPUT_TYPES(s) -> dict:
return {
"required": {
"value": ("STRING", {"multiline": True, "dynamicPrompts": False})
}
}
@ -76,4 +102,6 @@ NODE_CLASS_MAPPINGS = {
"ConstantInteger": ConstantInteger,
"ConstantString": ConstantString,
"ConstantStringMultiline": ConstantStringMultiline,
"ConstantNonDynamicString": ConstantNonDynamicString,
"ConstantNonDynamicStringMultiline": ConstantNonDynamicStringMultiline
}