DonRomano Posted August 26, 2020 Share Posted August 26, 2020 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") try: node.parm("buildHierarchy").pressButton() except hou.OperationFailed: h.log.error("Can't build hierarchy") Anyone has an idea on how to catch this error ? Cheers, Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted August 26, 2020 Share Posted August 26, 2020 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) try: eval(cb, locals()) except: #handle 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.