SideFX Houdini customization package
git clone https://git.lucas.co/hou-control.git
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'."""