Jump to content

writing a .bgeo through python

Recommended Posts

I am working with a very large dataset that is divided into chunks,

and I am getting the data from a file, and then creating the poitns and faces in Houdini.

the points I make through a Python sop, and I want every chunk to be written out as a .bgeo

(as my computer can;t handle all the chunks at once)

so my logic was to do a for loop for every chunk and then use this code:

saveToFile("Y:/points/file_" + string(i)+".bgeo")

i should increment, and the command should work however I keep getting thrown this error:

module has no object saveToFile

I tried hou.saveToFile() but no luck there either...

all help is appreciated!

Share this post

Link to post
Share on other sites
Guest mantragora

1. And you are executing this on geometry(), right?


2. Also, maybe if you use double "\\" in path it will work better?

Edited by mantragora
  • Like 1

Share this post

Link to post
Share on other sites

got it working, apparantly I'm just not thinking straight today xD

it needed to be:

geo.saveToFile("Y:/points/file_" + str(i)+".bgeo")

geo.saveToFile (got to specify what to save in this case geo)

str() instead of string, string() does not exist...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now