1
+ from meshroom .core import desc
2
+
3
+ class GroupAttributes (desc .Node ):
4
+ documentation = """ Test node to connect GroupAttributes to other GroupAttributes. """
5
+ category = 'Test'
6
+
7
+ # Inputs to the node
8
+ inputs = [
9
+ desc .GroupAttribute (
10
+ name = "firstGroup" ,
11
+ label = "First Group" ,
12
+ description = "Group at the root level." ,
13
+ group = None ,
14
+ exposed = True ,
15
+ groupDesc = [
16
+ desc .IntParam (
17
+ name = "firstGroupIntA" ,
18
+ label = "Integer A" ,
19
+ description = "Integer in group." ,
20
+ value = 1024 ,
21
+ range = (- 1 , 2000 , 10 ),
22
+ exposed = True ,
23
+ ),
24
+ desc .IntParam (
25
+ name = "firstGroupIntB" ,
26
+ label = "Integer B" ,
27
+ description = "Integer in group." ,
28
+ value = 1024 ,
29
+ range = (- 1 , 2000 , 10 ),
30
+ exposed = True ,
31
+ ),
32
+ desc .IntParam (
33
+ name = "firstGroupIntC" ,
34
+ label = "Integer C" ,
35
+ description = "Integer in group." ,
36
+ value = 64 ,
37
+ range = (0 , 500 , 1 ),
38
+ exposed = True ,
39
+ ),
40
+ desc .BoolParam (
41
+ name = "firstGroupBool" ,
42
+ label = "Boolean" ,
43
+ description = "Boolean in group." ,
44
+ value = True ,
45
+ advanced = True ,
46
+ exposed = True ,
47
+ ),
48
+ desc .GroupAttribute (
49
+ name = "nestedGroup" ,
50
+ label = "Nested Group" ,
51
+ description = "A group within a group." ,
52
+ group = None ,
53
+ exposed = True ,
54
+ groupDesc = [
55
+ desc .FloatParam (
56
+ name = "nestedGroupFloat" ,
57
+ label = "Floating Number" ,
58
+ description = "Floating number in group." ,
59
+ value = 1.0 ,
60
+ range = (0.0 , 100.0 , 0.01 ),
61
+ exposed = True
62
+ ),
63
+ ],
64
+ ),
65
+ desc .ListAttribute (
66
+ name = "groupedList" ,
67
+ label = "Grouped List" ,
68
+ description = "List of groups within a group." ,
69
+ advanced = True ,
70
+ exposed = True ,
71
+ elementDesc = desc .GroupAttribute (
72
+ name = "listedGroup" ,
73
+ label = "Listed Group" ,
74
+ description = "Group in a list within a group." ,
75
+ joinChar = ":" ,
76
+ group = None ,
77
+ groupDesc = [
78
+ desc .ChoiceParam (
79
+ name = "listedGroupChoice" ,
80
+ label = "Choice" ,
81
+ description = "Choice attribute in a group in a list within a group." ,
82
+ value = "a" ,
83
+ values = ["a" , "b" , "c" , "d" ],
84
+ exposed = True ,
85
+ ),
86
+ desc .FloatParam (
87
+ name = "listedGroupFloat" ,
88
+ label = "Floating Number" ,
89
+ description = "Floating number in a group in a list within a group." ,
90
+ value = 2.5 ,
91
+ range = (0.5 , 30.0 , 0.1 ),
92
+ exposed = True ,
93
+ ),
94
+ desc .IntParam (
95
+ name = "listedGroupInt" ,
96
+ label = "Integer 1" ,
97
+ description = "Integer in a group in a list within a group." ,
98
+ value = 12 ,
99
+ range = (3 , 24 , 1 ),
100
+ exposed = True ,
101
+ ),
102
+ ],
103
+ ),
104
+ ),
105
+ ],
106
+ ),
107
+ desc .IntParam (
108
+ name = "exposedInt" ,
109
+ label = "Exposed Integer" ,
110
+ description = "Integer at the rool level, exposed." ,
111
+ value = 1000 ,
112
+ exposed = True ,
113
+ ),
114
+ desc .BoolParam (
115
+ name = "unexposedBool" ,
116
+ label = "Unexposed Boolean" ,
117
+ description = "Boolean at the root level, unexposed." ,
118
+ value = True ,
119
+ ),
120
+ desc .GroupAttribute (
121
+ name = "inputGroup" ,
122
+ label = "Input Group" ,
123
+ description = "A group set as an input." ,
124
+ group = None ,
125
+ groupDesc = [
126
+ desc .BoolParam (
127
+ name = "inputBool" ,
128
+ label = "Input Bool" ,
129
+ description = "" ,
130
+ value = False ,
131
+ ),
132
+ ],
133
+ ),
134
+ ]
135
+
136
+ outputs = [
137
+ desc .GroupAttribute (
138
+ name = "outputGroup" ,
139
+ label = "Output Group" ,
140
+ description = "A group set as an output." ,
141
+ group = None ,
142
+ exposed = True ,
143
+ groupDesc = [
144
+ desc .BoolParam (
145
+ name = "outputBool" ,
146
+ label = "Output Bool" ,
147
+ description = "" ,
148
+ value = False ,
149
+ exposed = True ,
150
+ ),
151
+ ],
152
+ ),
153
+ ]
0 commit comments