This commit is contained in:
justumen
2025-02-16 20:58:39 +01:00
parent dfcf429e5c
commit 3ebd5cbb92
22 changed files with 967 additions and 132 deletions

14
text_to_variable.py Normal file
View File

@@ -0,0 +1,14 @@
class TextToVariable:
@classmethod
def INPUT_TYPES(s):
return {"required": {"variable_name": ("STRING", {"default": "variable_name"}),
"text_value": ("STRING", {"forceInput": True})}}
RETURN_TYPES = ("STRING",)
FUNCTION = "process"
CATEGORY = "Custom"
def process(self, variable_name, text_value):
text_value = text_value.replace("\n", ";")
output_string = f"{variable_name} = {text_value}"
return (output_string,)