Set HDA to Embedded using Python

   471   2   0
User Avatar
Member
83 posts
Joined: 4月 2014
Offline
I am trying to set a node to be 'Embedded' exclusively using Python. I can get the current .hda path by doing node.type().definition().libraryFilePath(), but I do not know the code to change that to be 'Embedded'. Any help is welcomed.
User Avatar
Member
143 posts
Joined: 5月 2017
Offline
You can use the save [www.sidefx.com] method of the hda definition:

>>> node = hou.node('/obj/box1/Test')
>>> nt = node.type()
>>> d = nt.definition()
>>> d.save("Embedded")
Edited by viklc - 2023年11月15日 19:09:56
User Avatar
Member
83 posts
Joined: 4月 2014
Offline
Yes this works, thank you
  • Quick Links