mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-24 22:12:16 -03:00
0.71
This commit is contained in:
14
text_to_variable.py
Normal file
14
text_to_variable.py
Normal 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,)
|
||||
Reference in New Issue
Block a user