git.lucas.co / hou-control
SideFX Houdini customization package
git clone https://git.lucas.co/hou-control.git

commitc2af94e5c847e98fd5a5d0d1b2dc33081588c815
parent7e74eed0a6
authorLucas Galante <[email protected]>
date2026-09-14 10:20
hc: list Dim Unused Nodes in the HC Panel

toggleDimUnusedNodes existed but was not a command. It is now a checkbox
row in network editors, reading the dimunusednodes pref.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

 python3.13libs/hc/hcnetworkeditor.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/python3.13libs/hc/hcnetworkeditor.py b/python3.13libs/hc/hcnetworkeditor.py
index bec7c90..a0c3601 100644
--- a/python3.13libs/hc/hcnetworkeditor.py
+++ b/python3.13libs/hc/hcnetworkeditor.py
@@ -1062,13 +1062,16 @@ class HCNetworkEditor(HCPathTab):
     def showPathMessage(self):
         self.hou_tab.flashMessage(image=None, message=self.path(), duration=1)
 
+    def isDimmingUnusedNodes(self):
+        return self.hou_tab.getPref('dimunusednodes')
+
+    @command("Dim Unused Nodes", state="isDimmingUnusedNodes")
     def toggleDimUnusedNodes(self):
         map = {
             '0': '1',
             '1': '0'
         }
-        mode = self.hou_tab.getPref('dimunusednodes')
-        self.hou_tab.setPref('dimunusednodes', map[mode])
+        self.hou_tab.setPref('dimunusednodes', map[self.isDimmingUnusedNodes()])
 
     def gridMode(self):
         """The `gridmode` pref as Houdini stores it: '0', '1' or '2'."""