Can you query parm data from inside an hda file?

   3374   1   1
User Avatar
Member
5 posts
Joined: 3月 2019
オフライン
It's already possible to query certain information inside an HDA file before it's loaded, for example:

cmds.houdiniAsset(listAssets="d:/tests/my_hda.hda")

will list all "assets" in the HDA, but is it possible to query any other information or metadata? (i.e. Parameter (parm) data)?

I would really like to be able to query parameter info if possible, for example - whether the "basegroup" > "sidefx::maya_component_selection_type" tag exists, and if so, what it's value is (i.e. "vertex", "face", etc...)

If this isn't (currently) possible from an unloaded hda filePath, is there any way to query this info after the hda is loaded and instantiated as an Asset node in Maya?

Apologies if this is already covered in the plugin docs or on this forum, I did look first but didn't find anything.
Thanks
User Avatar
スタッフ
641 posts
Joined: 8月 2019
オフライン
Unfortunately there currently isn't much support for reading data from assets before they have been loaded.

Regarding querying parm tags, we store information about them in attribute categories. You should be able to read the category from the attribute plug:

string $categories[] = `addAttr -q -category ($plug)`;

See here for an example of how we use it internally: AEhoudiniAssetTemplate.mel#L270 [github.com]
Edited by johnmather - 2025年1月5日 00:56:02
  • Quick Links