20
20
"""
21
21
VERSION HISTORY
22
22
23
- 1.2.1 - Code refactoring
24
- - PEP8 formatting
23
+ 1.3.0 - 01/31/23
24
+ - Add new width: 200
25
25
26
- 1.2 - 18/03/22
26
+ 1.2.1 - 12/17/22
27
+ - Code refactoring
28
+ - PEP8 formatting
29
+
30
+ 1.2.0 - 18/03/22
27
31
- Moved label "Set Node Width" inside IF statement
28
32
29
- 1.1 - 20/09/22
33
+ 1.1.0 - 20/09/22
30
34
- Changed scope from Active to All Selected
31
35
- Added Button for Toggle Hidden Sockets
32
36
38
42
bl_info = {
39
43
"name" : "QRN (Quick Resize Node)" ,
40
44
"author" : "Don Schnitzius" ,
41
- "version" : (1 , 2 , 1 ),
45
+ "version" : (1 , 3 , 0 ),
42
46
"blender" : (2 , 80 , 0 ),
43
47
"location" : "Node Editor > Sidebar > Arrange" ,
44
48
"description" : "Assign a Fixed Width to Selected Nodes" ,
@@ -99,6 +103,8 @@ def draw_panel(self, layout):
99
103
row .operator ('node.button_640' )
100
104
101
105
row = layout .row (align = True )
106
+ row .operator ('node.button_200' )
107
+ row .scale_x = 2.0
102
108
row .operator ('node.button_700' )
103
109
104
110
row = layout .row (align = True )
@@ -197,6 +203,19 @@ def execute(self, context):
197
203
return {'FINISHED' }
198
204
199
205
206
+ class RN_OT__NodeButton200 (Operator ):
207
+ """Set node width to 200"""
208
+ bl_idname = 'node.button_200'
209
+ bl_label = '200'
210
+
211
+ def execute (self , context ):
212
+ nodes , links = get_nodes_links (context )
213
+ for node in nodes :
214
+ if node .select == True :
215
+ node .width = 200
216
+ return {'FINISHED' }
217
+
218
+
200
219
class RN_OT__NodeButtonHideToggle (Operator ):
201
220
"""Toggle Hidden Node Sockets"""
202
221
bl_idname = 'node.button_toggle_hidden'
@@ -215,6 +234,7 @@ def execute(self, context):
215
234
RN_OT__NodeButton440 ,
216
235
RN_OT__NodeButton540 ,
217
236
RN_OT__NodeButton640 ,
237
+ RN_OT__NodeButton200 ,
218
238
RN_OT__NodeButton700 ,
219
239
RN_OT__NodeButtonHideToggle
220
240
]
0 commit comments