Hi!
I'm generating my own HDA with python and everything works fine, except I can't see it in context menu. Easy to fix by removing HDA_TABLE_AND_NAME and set VOP checkbox in my case.
But how to do this with python automatically during HDA creation?
It looks like there is a tool inside HDA definition, which I suppose to be able to access and modify, but can't find a way.
How to modify HDA context visibility with python?
1495 7 2- miklem
- Member
- 43 posts
- Joined: 4月 2012
- Offline
- Jonathan de Blok
- Member
- 274 posts
- Joined: 7月 2013
- Offline
- miklem
- Member
- 43 posts
- Joined: 4月 2012
- Offline
- Jonathan de Blok
- Member
- 274 posts
- Joined: 7月 2013
- Offline
- miklem
- Member
- 43 posts
- Joined: 4月 2012
- Offline
I checked API and found nothing that might help. Actually it looks like a bug or someone forgot to add API connection for this thing. I could add my HDA to the shelf and spawn it from here, for sure, but this is not an option, since I have a lot of HDAs.
Need a old_school power here
Need a old_school power here
Edited by miklem - 2023年12月13日 11:03:04
- graham
- Member
- 1922 posts
- Joined: 11月 2006
- Offline
This post might be helpful as things don't seem to have changed and any creation of HDAs via Python does not generate the default tool by default: https://www.sidefx.com/forum/topic/85634/ [www.sidefx.com]
To basically change things after the fact you're pretty much forced to take the contents of the Tools.shelf section, parse the XML into a structure you can manipulate, add/modify whatever settings you want, then set the resulting data back to the definition.
To basically change things after the fact you're pretty much forced to take the contents of the Tools.shelf section, parse the XML into a structure you can manipulate, add/modify whatever settings you want, then set the resulting data back to the definition.
Graham Thompson, Technical Artist @ Rockstar Games
- miklem
- Member
- 43 posts
- Joined: 4月 2012
- Offline
- miklem
- Member
- 43 posts
- Joined: 4月 2012
- Offline
Okay, I made it work!
First here is the documentation
https://www.sidefx.com/docs/houdini20.0/shelf/config_file [www.sidefx.com]
Graham, I then took your code, and modified this part, by adding <contextNetType>VOP</contextNetType>.
Also for someone looking for the topic, there is relevant discussion
https://www.sidefx.com/forum/topic/40864/?page=1#post-183147 [www.sidefx.com]
Thank you for help.
First here is the documentation
https://www.sidefx.com/docs/houdini20.0/shelf/config_file [www.sidefx.com]
Graham, I then took your code, and modified this part, by adding <contextNetType>VOP</contextNetType>.
<toolMenuContext name="network">
<contextOpType>table/operator</contextOpType>
<contextNetType>VOP</contextNetType>
</toolMenuContext>
Also for someone looking for the topic, there is relevant discussion
https://www.sidefx.com/forum/topic/40864/?page=1#post-183147 [www.sidefx.com]
Thank you for help.
Edited by miklem - 2023年12月14日 05:45:10
-
- Quick Links