maolili commited on
Commit
c09b483
·
verified ·
1 Parent(s): bff9fdf

Upload inp.py

Browse files
Files changed (1) hide show
  1. inp.py +34 -0
inp.py ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ class get_string:
4
+ @classmethod
5
+ def INPUT_TYPES(s):
6
+ return {
7
+ "required": {
8
+ "input_string": ("STRING", {"multiline": True}),
9
+ },
10
+ }
11
+
12
+ RETURN_TYPES = ("STRING",)
13
+ RETURN_NAMES = ("string",)
14
+
15
+ FUNCTION = "substr"
16
+
17
+ # OUTPUT_NODE = False
18
+
19
+ CATEGORY = "昂昂"
20
+
21
+ def substr(self, input_string):
22
+ out = input_string
23
+ return (out,)
24
+
25
+
26
+
27
+ # 节点注册
28
+ NODE_CLASS_MAPPINGS = {
29
+ "inputString":get_string
30
+ }
31
+
32
+ NODE_DISPLAY_NAME_MAPPINGS = {
33
+ "inputString": "input String"
34
+ }