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.
Handles in HDA's - how to toggle them on and off
9472 9 5- GaryHanna
- Member
- 32 posts
- Joined: 1月 2017
- Offline
- GaryHanna
- Member
- 32 posts
- Joined: 1月 2017
- Offline
- Kubaki
- Member
- 12 posts
- Joined: 5月 2015
- Offline
- choix
- Member
- 12 posts
- Joined: 10月 2016
- Offline
- miiicom
- Member
- 1 posts
- Joined: 4月 2018
- Offline
- Werner Ziemerink
- Member
- 1268 posts
- Joined: 3月 2014
- Offline
- ZoltanE
- Member
- 18 posts
- Joined: 7月 2013
- Offline
- Leaf
- Member
- 12 posts
- Joined: 5月 2017
- Offline
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
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
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)
Edited by Leaf - 2019年3月4日 20:08:11
- ZoltanE
- Member
- 18 posts
- Joined: 7月 2013
- Offline
- CYTE
- Member
- 708 posts
- Joined: 2月 2017
- Offline
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
Cheers
CYTE
-
- Quick Links