-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCheckProgress.py
More file actions
42 lines (30 loc) · 1.01 KB
/
Copy pathCheckProgress.py
File metadata and controls
42 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import PySimpleGUI as sg
class CheckProgress:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"image": ("IMAGE",),
"StopFlow": (["Yes", "No"],),
},
}
RETURN_TYPES = ("IMAGE",)
FUNCTION = "stop"
CATEGORY = "Example"
def stop(self, image, StopFlow):
if StopFlow == "Yes":
layout = [[sg.Button('Continue'), sg.Button('Stop Flow')]]
window = sg.Window('Do you wish to continue?', layout)
event, values = window.read()
window.close()
if event == 'Continue':
print("Continue the flow....")
return (image,)
else:
print("******* STOP THE FLOW *******")
return None
return (image,)
NODE_CLASS_MAPPINGS = { "CHECK_PROGRESS": CheckProgress }
NODE_DISPLAY_NAME_MAPPINGS = { "Example": "Check Progress" }