mirror of
https://github.com/justUmen/Bjornulf_custom_nodes.git
synced 2026-03-21 20:52:11 -03:00
v0.11
This commit is contained in:
22
random_seed_with_text.py
Normal file
22
random_seed_with_text.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import random
|
||||
|
||||
class TextToStringAndSeed:
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return {
|
||||
"required": {
|
||||
"text": ("STRING", {"forceInput": True}),
|
||||
"seed": ("INT", {"default": 1}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_NAMES = ("text", "random_seed")
|
||||
RETURN_TYPES = ("STRING", "INT")
|
||||
FUNCTION = "text_with_random_seed"
|
||||
CATEGORY = "Bjornulf"
|
||||
|
||||
def text_with_random_seed(self, text, seed):
|
||||
# Generate a random seed (integer)
|
||||
random_seed = random.randint(0, 2**32 - 1)
|
||||
|
||||
return (text, random_seed)
|
||||
Reference in New Issue
Block a user