mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-21 12:42:11 -03:00
14 lines
509 B
Python
14 lines
509 B
Python
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,) |