SideFX Houdini customization package
git clone https://git.lucas.co/hou-control.git
hc: drop the confirmation messages from the node color/shape commands
Reset Node Colors and Set Node Shapes each announced what they had just
done. The result is visible in the network editor, so the status bar was
restating it.
Set Node Shapes no longer needs to know whether it took the selection or
fell back to the whole network -- that only fed the message -- so the two
branches collapse to one expression. The warnings for an empty selection
stay: a command that does nothing has to say so.
Co-Authored-By: Claude Opus 5 <[email protected]>
python3.13libs/hc/hcnetworkeditor.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/python3.13libs/hc/hcnetworkeditor.py b/python3.13libs/hc/hcnetworkeditor.py
index e44a494..4e8a341 100644
--- a/python3.13libs/hc/hcnetworkeditor.py
+++ b/python3.13libs/hc/hcnetworkeditor.py
@@ -1271,7 +1271,6 @@ class HCNetworkEditor(HCPathTab):
for node in nodes:
node.setColor(color)
node.setUserData("hc_custom_color", color_hex)
- hou.ui.setStatusMessage(f"Reset {len(nodes)} node(s) to {color_hex}")
@command("Set Node Shapes")
def setNodeShapes(self):
@@ -1284,10 +1283,7 @@ class HCNetworkEditor(HCPathTab):
sibling Set Node Colors has always honoured the selection.
"""
network = self.hou_tab.pwd()
- nodes = list(network.selectedChildren())
- selected = bool(nodes)
- if not selected:
- nodes = list(network.children())
+ nodes = list(network.selectedChildren()) or list(network.children())
if not nodes:
hou.ui.setStatusMessage("No nodes to shape",
hou.severityType.Warning)
@@ -1297,6 +1293,3 @@ class HCNetworkEditor(HCPathTab):
with hou.undos.group("Set Node Shapes"):
for node in nodes:
node.setUserData("nodeshape", shape)
- target = (f"{len(nodes)} selected node(s)" if selected
- else f"all {len(nodes)} node(s) in this network")
- hou.ui.setStatusMessage(f"Set {target} to shape {shape}")