-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnodes_group.py
More file actions
44 lines (39 loc) · 1.4 KB
/
Copy pathnodes_group.py
File metadata and controls
44 lines (39 loc) · 1.4 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
43
44
"""
Group control helper nodes.
"""
from .nodes_common import WUDD_CATEGORY
class WuddGroupSwitch:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"enabled": (
"BOOLEAN",
{
"default": True,
"tooltip": "Master toggle for all listed canvas groups. If group_name is set, it controls only that group.",
},
),
"group_name": (
"STRING",
{
"default": "",
"multiline": False,
"tooltip": "Leave empty to show and control all canvas groups. Use self/current/auto for the containing group, or type an exact group title.",
},
),
"off_mode": (
["mute", "bypass"],
{
"default": "mute",
"tooltip": "mute sets group nodes to Never; bypass sets group nodes to Bypass.",
},
),
},
}
RETURN_TYPES = ("BOOLEAN", "STRING")
RETURN_NAMES = ("enabled", "group_name")
FUNCTION = "switch_group"
CATEGORY = WUDD_CATEGORY
def switch_group(self, enabled, group_name="", off_mode="mute"):
return (bool(enabled), group_name or "")