hou python action to update hda definitions

   1853   2   0
User Avatar
Member
2 posts
Joined: Feb. 2023
Offline
I want to do the same action in the "Asset definition Toolbar" menu switch between definition version via python.

I cant seem to find anything in the hou.hda, hou.HDADefinition, or houNodeType.

When I toggle between hda versions I can see houdini is temporarily creating a new node (as the unique node name increments) then renames it to the original node (I'm assuming its being destroyed)


Anyone know what is being called? a uitil or something?

Attachments:
hou_action.jpg (19.4 KB)

User Avatar
Member
30 posts
Joined:
Offline
it's a method of the Node class - changeNodeType()
https://www.sidefx.com/docs/houdini/hom/hou/Node.html [www.sidefx.com]

terrible nom tested code
nd = hou.node('/obj/FlipsInNips1')
nd.changeNodeType("namespace::main::FlipsInNips::2.0")

cheers,
chrisg
User Avatar
Member
2 posts
Joined: Feb. 2023
Offline
thanks, thats the one! just needs the network argument
hda_node.changeNodeType("namespace::main::FlipsInNips::2.0", keep_network_contents=False)
Edited by McFriskInTheLicks - Feb. 28, 2023 05:03:26
  • Quick Links