Krion Posted November 2, 2021 Share Posted November 2, 2021 Hi guys, I have this simple script in a Shelf tool: import hou selectednodes = hou.selectedNodes() for selectednode in selectednodes: parms = selectednode.parms() for parm in parms: val = parm.eval() if type(val) is int or type(val) is float: parm.setExpression('ch(chsop("ref_source"') But it gives an error when trying to execute (on the line that it's getting the 'val' variable). return _hou.Parm_eval(self) hou.ObjectWasDeleted: Attempt to access an object that no longer exists in Houdini. Why is this? I have done this sortof stuff before. This is something that is possible right? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Krion Posted November 2, 2021 Author Share Posted November 2, 2021 (edited) Now after trying again the same code, it doesn't give the error anymore, but Houdini just crashes unless I comment-out the parm.setExpression(). Weird. I don't see what I'm doing wrong. This the crash log: Edited November 2, 2021 by Krion Quote Link to comment Share on other sites More sharing options...
Krion Posted November 2, 2021 Author Share Posted November 2, 2021 I see the issue is mainly on nodes with multiparms, which is precisely the kind of node for which I am writing this script.. 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.