File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 27
27
28
28
from .nodes .Json .RF_JsonStyleLoader import RF_JsonStyleLoader
29
29
from .nodes .File .RF_SavePromptInfo import RF_SavePromptInfo
30
+ from .nodes .File .RF_StandardResolutions import RF_StandardResolutions
30
31
31
32
from .nodes .Primitives .RF_FloatPrimitive import RF_FloatPrimitive
32
33
from .nodes .Primitives .Array .RF_RangeInt import RF_RangeInt
78
79
"RF_JsonStyleLoader" : RF_JsonStyleLoader ,
79
80
80
81
# File
81
- "RF_SavePromptInfo" : RF_SavePromptInfo
82
+ "RF_SavePromptInfo" : RF_SavePromptInfo ,
83
+
84
+ # Standard Resolutions
85
+ "RF_StandardResolutions" : RF_StandardResolutions
82
86
}
83
87
84
88
# This magic will use a property DISPLAY_NAME on each node to get the display name of the node for the UI
Original file line number Diff line number Diff line change
1
+ class RF_StandardResolutions :
2
+ def __init__ (self ):
3
+ pass
4
+
5
+ @classmethod
6
+ def INPUT_TYPES (s ):
7
+ return {
8
+ "required" : {
9
+ "value" : (["Standard 1:1 (1024x1024)" , "Portrait 4:5 (1024x1280)" ], {
10
+ "forceInput" : False ,
11
+ "default" : "Standard 1:1 (1024x1024)" ,
12
+ })
13
+ },
14
+ }
15
+
16
+ DISPLAY_NAME = "Standard Resolutions"
17
+ CATEGORY = "RF/file"
18
+
19
+ RETURN_TYPES = ("INT" ,"INT" ,)
20
+ RETURN_NAMES = ("WIDTH" ,"HEIGHT" ,)
21
+
22
+ FUNCTION = "NodeProcess"
23
+ def NodeProcess (self , value ):
24
+ if value == "Standard 1:1 (1024x1024)" :
25
+ return (1024 , 1024 )
26
+ elif value == "Portrait 4:5 (1024x1280)" :
27
+ return (1024 , 1280 )
28
+ return (1024 , 1024 )
You can’t perform that action at this time.
0 commit comments