How can I add support for unzip'ing hip files when opened

   4150   8   3
User Avatar
Member
3 posts
Joined: Dec. 2005
Offline
Since hip files compress really well, I've been trying to come up with a hook that would allow you to open a zipped hip file, and have it automatically unzip it.

At first I thought the 123 or 456 scripts were the way to go, but being a total newbie, I was completely wrong about when they are invoked in the overall lifecycle.

So I was hoping someone could point me in the right direction.

I'm using houdini 8 on a redhat 4 system.
Thanks,
Jordan
User Avatar
Member
7025 posts
Joined: July 2005
Offline
You need to alias houdini to a small script. R+H does this, so if it detects a .gz suffix it will expand it automatically first.

Basically, the script would look for a .gz (or .zip if you prefer) suffix when you specify a .hip file on the command line, and if it detects it, it unzips it first, then runs houdini on the expanded one.

Slightly related, I've long been frustrated that SESI doesn't build GZ compression into the saving of .hip files, perhaps off by default. Touch 101 (based on Houdini) has this native, I believe. Usually a 90% file size savings.

Cheers,

Peter B
User Avatar
Member
3 posts
Joined: Dec. 2005
Offline
Thanks for the quick reply. Unfortunately that particular solution doesn't handle the case when you open hip files ‘after’ a houdini session has been invoked. Are you aware of any clever hooks into that behaivour?
User Avatar
Member
7025 posts
Joined: July 2005
Offline
It's not possible if Houdini is already open. Well, OK, it is but it's a pain. You cannot use File->Open, you have to have a custom script that uses the “mread” Hscript command.

Another pet peeve All the pulldown menues should be links to scripts that you can customize!!

Cheers,

Peter B
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Should be trivial to implement as a cmd script, something along the lines of

unix ‘gunzip foobar.hip.gz’
mread foobar.hip


replacing foobar with a variable. However, the file requestor is missing from this equation so you'll need to get a little fancier to be able to use it in that manner. AFAIK the Houdini file requestor isn't “interruptable” - you can make an asset which has the result of a requestor as input, but that's getting ugly/busy.

I'm with you, Peter. I know the argument I heard was that hip's were basically cpio files, and they wanted to keep that integrity. However, I don't see why they can't append a ‘.gz’ to it and compress the cpio. Seems quite trivial to implement and philosophically is as acceptable as a ‘.cpio.gz’ file.

Cheers,

J.C.
John Coldrick
User Avatar
Member
3 posts
Joined: Dec. 2005
Offline
Thanks for all of your replies. If the file requestor isn't interruptable, then I guess there isn't a way in which to add an unzipping hook.

I don't know if houdini has this particular ability, but is there a way to add a button to any of the menu's, and define the behaivour there?
Jordan
User Avatar
Member
26 posts
Joined: Nov. 2008
Offline
Oh my, I was searching for an easy way to save / load compressed hip-files and as a Houdini noob I tried adding “.sc” or “.gz” behind “.hiplc” (like it works when exporting geometry etc.) but of course this didn't work.
Then I found this very old thread that I'd like to revive.

I have a file that takes 371MB as a hip file but compresses to less than 6MB when zipped!!!

Now that Houdini supports the super fast BLOSC compression it's quite a shame that it still can't compress the contents of hip-files out-of-the-box.

Where can I submit this feature request so that a developer actually sees it?

Cheers
Steffen
Ceterum censeo Autodesk esse delendam!
User Avatar
Staff
3455 posts
Joined: July 2005
Offline
http://www.sidefx.com/Support/report-a-bugrfe/ [sidefx.com]
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
26 posts
Joined: Nov. 2008
Offline
Thanks. I will add a feature request there.
Ceterum censeo Autodesk esse delendam!
  • Quick Links