Jump to content

Python - Issues building file from a template


TheAdmira1

Recommended Posts

Hello all,

So I'm building a "shot launcher' for my studio in Python.

The tool pops up a GUI, asks the artist for show, seq, shot, application, the plate, and some other info for naming and padding. The tool then builds a name for the file, reads in a template, edits necessary info, writes out the new file, and finally opens the file within the selected program.

This works great for Nuke, Maya, AE, and Syntheyes. However, when I edit the Ascii file for Houdini and then open it, I get an "Invalid .hip Header" warning, and the file fails to load. I have gone through the file created, and the template it was sourced from. The formatting all seems to be correct, but I notice that there are a ton of what I assume are generated sequences from when the template file was saved.

Is there a way to make editing and launching an Ascii file for Houdini work? Are the numbers/sequences I see throughout the file generated only for the original filename and destination?

Any help is greatly appreciated!

Link to comment
Share on other sites

.hip files are not pure ASCII. They are actually ASCII "packets" within a cpio format file. There are some provided command line tools to expand and collapse .hip files if you want to do some very low-level surgery. Personally, I would just load up hython with your .hip file, do whatever operation you want and then save it back out again.

Link to comment
Share on other sites

Is there a location online to see all of the modules present in Hython? I can find everything for the hou module just fine, but things like objecttoolutils and such are not documented on SideFX's site as far as I can tell. Sadly I do not have el googs at work :(

I can pull them up via the interactive help in the commandline, but I was hoping for something a bit easier to parse and move around in.

TIA!

Link to comment
Share on other sites

Sadly there is no proper documentation for these modules. I would suggest filing an RFE with SESI to provide automatic documention similar to Sphinx or the HDK docs for all their custom Python modules. I've got one in there somewhere.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...