Jump to content
Sign in to follow this  
kiryha

Export (import) object to file issue

Recommended Posts

In a blank scene create geometry node, select geo, run the code:

import hou
sceneRoot = hou.node('/obj/')
sel = hou.selectedNodes()
sceneRoot.saveItemsToFile(sel, 'C:/temp/test.hipnc')

Loading this file gives an error:

load_error_01.PNG.8f1346d7e268ba3d8e0c0a0b6c8f4fc6.PNG

Wired... it was working before!

Edited by kiryha

Share this post


Link to post
Share on other sites

Maybe it should not work if you try to load the exported file via the menu (File> Open)
Cos its working if I load it via Python:

import hou
sceneRoot = hou.node('/obj/')
sceneRoot.loadItemsFromFile('C:/temp/test.hipnc')

 

Share this post


Link to post
Share on other sites

I was testing this and running into the same error. It's weird why Houdini wouldn't allow us to open a proper hip file. May be it's meant to be like that but it could be misleading at times. 

Anyway good to know. Thanks!

 

Share this post


Link to post
Share on other sites

How can I get the list of objects in the scene after I import something from a file?

Get list before, get list after, subtract. Any better options?

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
Sign in to follow this  

×