Geometry ROP output to a legacy bgeo format

   2521   3   2
User Avatar
Member
48 posts
Joined: June 2011
Offline
Hi,

Does anyone know if there is a way to force a particular legacy format output when writing bgeo files. I have 3rd party dependencies which only work with Houdini 12.1-and-earlier format bgeo files, and so I have to keep around an old version just for outputing those files.

H12.5 certainly has no problem reading old files, is it possible to write them too? Naturally I'm only talking basic geometry types, I'm not expecting to store VDBs in old formats or anything.
User Avatar
Member
258 posts
Joined:
Offline
you can write the sequence out as .bhclassic from 12.5 then just rename the files to .bgeo after the sequence is finished.
User Avatar
Member
48 posts
Joined: June 2011
Offline
Ah nice, thanks. Any idea if it's possible to rename files using a Post-Frame Script? I get the feeling it's beyond the realm of hscript, and I haven't taken the plunge and learnt Python yet. ops:
User Avatar
Member
84 posts
Joined: May 2012
Offline
sure

write this into your Post Frame Script on your Rop node

import os

path = hou.pwd().parm(“sopoutput”).eval()
newpath = os.path.splitext(path) + “.bgeo”
if os.path.exists(newpath):
os.remove(newpath)
os.rename(path, newpath)

be sure to change the menu at the right side of the Post Script Frame from hscript to Python.
This will convert your “file.bhclassic” or actually “file.whatever” to “file.bgeo”. If the file.bgeo already exists it will overwrite it. If you want to rename it to other than .bgeo change to desired extension inside the code

cheers
  • Quick Links