gerardocastellanos Posted October 17, 2020 Share Posted October 17, 2020 Hi, I am new scripting for Houdini I made an script in python, I tested on "python source editor" window... it works So I decide to make a shelf buttom in order to store it and apply it later on. I put my code into the script tab and field, define python as my language. but when I click in my buttom, it says this error message: Quote Traceback (most recent call last): File "tool_1", line 7, in <module> File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.499/houdini/python2.7libs\hou.py", line 50447, in keyframes return _hou.Parm_keyframes(*args) ObjectWasDeleted: Attempt to access an object that no longer exists in Houdini. this is my code import hou for n in hou.selectedNodes(): for p in n.parms(): if len(p.keyframes()) > 0: exp = p.expression() exp = exp.replace("L_", "R_") p.setExpression(exp) what I did wrong? thanks you Quote Link to comment Share on other sites More sharing options...
Atom Posted October 18, 2020 Share Posted October 18, 2020 It works for me, but the error tells you what is wrong. A node in the selection was removed somewhere during the process. Try testing to make sure p is not None before trying to fetch the keyframes. 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.