Skip to content

Commit 22564fb

Browse files
committed
blender-qrn v.1.3.0
1 parent f577b2f commit 22564fb

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

README.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Select one or more Nodes to activate the buttons.
2121
+ **440**
2222
+ **550**
2323
+ **640**
24+
+ **200**
2425
+ **700 (Max Width)** - The least practical option, so obviously it deserves the largest button. 😊
2526

2627
### 👉 Toggle Hidden Sockets
@@ -36,16 +37,6 @@ But no matter – The buttons are still a convenient shortcut for tweaking Node
3637

3738
This addon pairs well with 3DSinghVFX's work-in-progress [**Align Nodes**](https://github.com/3DSinghVFX/align_nodes).
3839

39-
## Version History
40-
41-
**1.2**
42-
+ Moved *'Set Node Width'* label inside `If` statement
43-
44-
**1.1**
45-
+ Changed scope from **Active** to **All Selected**
46-
+ Added options for **540**, **640**, and **700**
47-
+ Added Button for **Toggle Hidden Sockets**
48-
4940
<br><br>
5041

5142
<p align="center">

resize_nodes.py

+25-5
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,17 @@
2020
"""
2121
VERSION HISTORY
2222
23-
1.2.1 - Code refactoring
24-
- PEP8 formatting
23+
1.3.0 - 01/31/23
24+
- Add new width: 200
2525
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
2731
- Moved label "Set Node Width" inside IF statement
2832
29-
1.1 - 20/09/22
33+
1.1.0 - 20/09/22
3034
- Changed scope from Active to All Selected
3135
- Added Button for Toggle Hidden Sockets
3236
@@ -38,7 +42,7 @@
3842
bl_info = {
3943
"name" : "QRN (Quick Resize Node)",
4044
"author" : "Don Schnitzius",
41-
"version" : (1, 2, 1),
45+
"version" : (1, 3, 0),
4246
"blender" : (2, 80, 0),
4347
"location" : "Node Editor > Sidebar > Arrange",
4448
"description": "Assign a Fixed Width to Selected Nodes",
@@ -99,6 +103,8 @@ def draw_panel(self, layout):
99103
row.operator('node.button_640')
100104

101105
row = layout.row(align=True)
106+
row.operator('node.button_200')
107+
row.scale_x = 2.0
102108
row.operator('node.button_700')
103109

104110
row = layout.row(align=True)
@@ -197,6 +203,19 @@ def execute(self, context):
197203
return {'FINISHED'}
198204

199205

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+
200219
class RN_OT__NodeButtonHideToggle(Operator):
201220
"""Toggle Hidden Node Sockets"""
202221
bl_idname = 'node.button_toggle_hidden'
@@ -215,6 +234,7 @@ def execute(self, context):
215234
RN_OT__NodeButton440,
216235
RN_OT__NodeButton540,
217236
RN_OT__NodeButton640,
237+
RN_OT__NodeButton200,
218238
RN_OT__NodeButton700,
219239
RN_OT__NodeButtonHideToggle
220240
]

0 commit comments

Comments
 (0)