Jump to content
scp

How to suppress load warnings on batch file open?

Recommended Posts

Just wondering if there is a way to bypass any load warnings when opening a scene with hbatch.

When I run a hython command, if there are any errors the process will just exit without completing the task.

Is there some kind of error check exception I could use to get round this, maybe with the hou.LoadWarning class but not quite sure how to use this. I've been racking my brains but not getting anywhere, any help would be appreciated.

Thanks

Simon

Share this post


Link to post
Share on other sites

With hbatch you should be able to pass in the -w option to suppress load warnings. For hython, I think you can catch the exceptions and ignore them but I'm not 100% sure on that one.

Share this post


Link to post
Share on other sites

I'd really like to know this too, I was attempting to send some batch processes to a renderfarm (not renders, just batch submissions of geometry processing) using hython, and really had trouble with the load warnings.

Share this post


Link to post
Share on other sites

Indeed this would be a good candidate for a RFE. Supposedly harmless load warning can ruin your day while processing on a farm with hython.

Share this post


Link to post
Share on other sites

Thanks for the replies. They can indeed ruin ones day. Still not sure how or whether I can catch these exceptions from hython yet though. If anyone has any further ideas that would be great. Thanks, s

Share this post


Link to post
Share on other sites

in the docs it says:

load(file_name, suppress_save_prompt=False, ignore_load_warnings=False)

but I can't seem to run the function with any argument other than just the file_name. What would the correct syntax be?


In the meantime I found this example code in the net which works for me.

try:
   hou.hipFile.load(hipFile)
except hou.LoadWarning:
   pass

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

×