Jump to content

writing a .bgeo through python


freaq

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!

Link to comment
Share on other sites

Guest mantragora

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

pseudocode: 
chunk.geometry().saveToFile(somepath)

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

Edited by mantragora
  • Like 1
Link to comment
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...

Link to comment
Share on other sites

  • 3 years later...

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...