first commit

This commit is contained in:
justumen
2024-07-06 12:05:16 +02:00
commit 643bf5d843
74 changed files with 1553 additions and 0 deletions

22
loop_texts.py Normal file
View File

@@ -0,0 +1,22 @@
class LoopTexts:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"number_of_inputs": ("INT", {"default": 2, "min": 2, "max": 10, "step": 1}),
"text_1": ("STRING", {"forceInput": "True"}),
"text_2": ("STRING", {"forceInput": "True"}),
},
"hidden": {
**{f"text_{i}": ("STRING", {"forceInput": "True"}) for i in range(3, 11)}
}
}
RETURN_TYPES = ("STRING",)
FUNCTION = "loop_texts"
OUTPUT_IS_LIST = (True,)
CATEGORY = "Bjornulf"
def loop_texts(self, number_of_inputs, **kwargs):
text_list = [kwargs[f"text_{i}"] for i in range(1, number_of_inputs + 1) if f"text_{i}" in kwargs]
return (text_list,)