Search - User list
Full Version: Handles in HDA's - how to toggle them on and off
Root » Technical Discussion » Handles in HDA's - how to toggle them on and off
GaryHanna
Hello all,

I exported several handles to an HDA I'm working on and I need them to toggle on and off automatically according to what the user specifies in the ordered menu, I can't get it to work nor can I find any documentation on what to do.

I see in the binding's tab there's an onoff parameter but nothing happens when I try to put in a boolean. And the coding for “hide when” or “disable when” doesn't work with handles, only parameters…I've had that put into the translation parameters the handle is controlling but it doesn't hide the handles. For the record I'm not a programmer so not sure if this is even a scripting issue, but figured there's at least be a user friendly option.
GaryHanna
Kubaki
Hey mate, did you end up figuring this one out? I'm having a similar issue here
choix
Me too, would be glad about any ideas
miiicom
There is a little Hide When in the Type property window that allows you to types in conditions to hide certain parameters for the HDA. The iamge is an example from auto UV sop in Game shelf tools.
Werner Ziemerink
I'm sitting with the same problem at the moment. Did you managed to get it to work?
ZoltanE
Same issue here.
Leaf
The ability to show/hide handles through Python looks like it was added in Houdini 17 along with the Python States [www.sidefx.com] update. As far as I can see, you still can't toggle the visibility on the node/handle itself, rather you can show/hide it in a specific scene viewer with hou.SceneViewer.showHandle [www.sidefx.com]

If you're writing your own state, your class should be keeping a reference to the scene viewer to use.
If you're just using standard promoted handles, it's less straightforward. You can just do
import stateutils
sv = stateutils.findSceneViewer()
sv.showHandle("Transformer",False)
However, that could start breaking for people with a desktop layout with more than one sceneviewer (or with no sceneviewers). You'd really have to loop over all the scene viewers (using hou.ui.paneTabOfType(hou.paneTabeType.SceneViewer, index))and try to hide the handle in all of them
ZoltanE
Ben Laidlaw showed me another way: create a toggle param and bind it to the handle's onoff thing. At that point the checkbox controls handle visibility. To automate it just hide the param and change its value from a python module in the Scripts tab, using arbitrary logic.
CYTE
Is there a way to hide them completely? The on/off toggle in the Handle Bindings Tab only greys them out. But they are still visible in the viewport and still recognize the mouse. So when an active handle(one I actually want to use) is overlayed by a off-toggled one. the active one is hard to select as the mouse wants to grab the inactive one, too. Why does the on/off toggle not hide them completely....

Cheers
CYTE
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB