Jump to content

Get pressButton() error raise in try block

Recommended Posts

Hey guys,

I'm scripting some pipeline things, and I'm stuck on getting the error raise when pressButton() method fails. Here's my not working code :

import houdini_log as h

node = hou.node("obj").createNode("alembicarchive")

except hou.OperationFailed:
  h.log.error("Can't build hierarchy")

Anyone has an idea on how to catch this error ?



Share this post

Link to post
Share on other sites

Unfortunately, it's not working that way. I submitted an RFE a long time ago, but they still quiet on this.

But you can still get what you want:

parm = your_alembic_node.parm("buildHierarchy")
cb = parm.parmTemplate().scriptCallback()
kwargs = dict(node=your_alembic_node)
	eval(cb, locals())


  • Like 1

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