Jump to content

How to suppress load warnings on batch file open?


scp

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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 3 years later...

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