Hi,
anyone know a bit of quick python I can use to query the current Tab context folders available when I hit tab in a particular network view context.
i.e in SOP's it would return : “attribute”, “character”,“crowds”, “polygon”,“primitive”…
I can query the submenu path of each all available operators individually to build a list but that would be crazy
Query tab menu context folders
2911 3 2- _milo_
- Member
- 763 posts
- Joined: 9月 2011
- Offline
- redpaw
- Member
- 75 posts
- Joined:
- Offline
- mikelyndon-sesi
- Member
- 394 posts
- Joined: 5月 2017
- Offline
Hi,
You can access it through the HDADefinition class.
So if you have a node selected you could do something like,
You can access it through the HDADefinition class.
So if you have a node selected you could do something like,
import xml.etree.ElementTree as ET node = hou.node('/currently/selected/node/path') definition = node.type().definition() toolssection = definitions.sections()['Tools.shelf'] root = ET.fromstring(toolssection.contents()) for path in root.iter('toolSubmenu'): print(path.text)
- hernanllano
- Member
- 8 posts
- Joined: 8月 2014
- Offline
mikelyndon-sesi
Hi,
You can access it through the HDADefinition class.
So if you have a node selected you could do something like,import xml.etree.ElementTree as ET node = hou.node('/currently/selected/node/path') definition = node.type().definition() toolssection = definitions.sections()['Tools.shelf'] root = ET.fromstring(toolssection.contents()) for path in root.iter('toolSubmenu'): print(path.text)
HI Mike, I was wondering if there is any way to set that same value, say for example that I want to set the TAB Submenu Path where the digital asset is stored when I press tab via Python.
Thanks
-
- Quick Links