Hi all
I have a working python state that displays some information in the UI. I want this state to always be active from the moment Houdini starts. Can anyone tell me how to do that? My state seems to disable when I select different objects no matter what I change.
Thanks!
How to make a python UI state permanent?
1337 4 0- ndasilva
- Member
- 60 posts
- Joined: 7月 2014
- Offline
- mabelzile
- スタッフ
- 401 posts
- Joined: 2月 2018
- Offline
By default python states belongs to one context only, you can register your state with multiple contexts that would keep the state active as you select nodes in different contexts. Take a look at the context argument of the hou.ViewerStateTemplate API
https://www.sidefx.com/docs/houdini18.0/hom/hou/ViewerStateTemplate.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini18.0/hom/hou/ViewerStateTemplate.html [www.sidefx.com]
Edited by mabelzile - 2020年8月7日 17:00:14
- ndasilva
- Member
- 60 posts
- Joined: 7月 2014
- Offline
I guess what I'm trying to do is not make it sensitive to selection at all. If I specify a node, I want the state to stay active regardless of what I'm currently selecting or not. Is that possible? Basically I want a UI overlay that displays information on a node whether it's the current selection or not. It seems that even when selecting nodes of the same context is stops displaying my state.
Thanks so much!
Thanks so much!
Edited by ndasilva - 2020年8月8日 00:58:04
- mabelzile
- スタッフ
- 401 posts
- Joined: 2月 2018
- Offline
- ndasilva
- Member
- 60 posts
- Joined: 7月 2014
- Offline
-
- Quick Links