Python: find the (last) Houdini version a HDA was saved from

   354   1   2
User Avatar
Member
76 posts
Joined: March 2007
Offline
Hi folks,

Can't seem to find any function for this in either hou.Node, hou.NodeType, hou.HDADefinition or hou.HDASection
Even the good old opstat hscript command doesn't help out..

I can kind of see what I need in the Contents.dir/Contents.houdini_versions file on disk inside the unpacked HDA.
But I'm hoping I don't need to parse the file on disk.

When I try to get to the Contents HDA Section it appears to be gzipped according to the hou module.
So when doing:
contents = node.type().definition().sections()['Contents.gz']
contents.contents()
I get a block of unreadable hex code back.

Then I figured out you can set the Contents to be uncompressed (in TypeProperties/Save/CompressionType)and save the HDA to disk again. Apparently this is not influencing what's on disk but how the HDA is stored in memory.
When I then get the contents it seems to be the all the Contents files combined in I guess CPIO format.

Anyone has some leads here?

cheers,
benS
Edited by ben5ch - Oct. 27, 2023 12:09:55
User Avatar
Member
76 posts
Joined: March 2007
Offline
So just to be clear I'm looking for a hou module solution.
Or maybe someone can confirm it's simply not possible at the moment.
  • Quick Links