stevegh Posted October 1, 2013 Share Posted October 1, 2013 I have searched the docs high and low and cannot seem to find a way to remove a parm/parmTuple using python. The removeSpareParmFolder method wants an empty folder, so how does one empty it? Quote Link to comment Share on other sites More sharing options...
stevegh Posted October 1, 2013 Author Share Posted October 1, 2013 Clockwork, as soon as I post the question I find the answer-> removeSpareParmTuple Sorry guys! Quote Link to comment Share on other sites More sharing options...
stevegh Posted October 1, 2013 Author Share Posted October 1, 2013 Ok now the real question. I am putting together a simple proof of concept for adding and removing shader patterns using python, and so far so good, right until I get to the removing part. Right now I am looping through the parm tuples in the previously created folder, and removing them with removeSpareParmTuple as follows: for i in node.parmTuplesInFolder((folder, )): node.removeSpareParmTuple(i)[/CODE]It removes some of the parameters but then throws this error:[CODE]Error running callback:Traceback (most recent call last): File "<stdin>", line 1, in <module> File "opdef:/Shop/pythonHda02?PythonModule", line 50, in deleteFolder File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.533/houdini/python2.6libs\hou.py", line 48221, in __len__ return _hou.ParmTuple___len__(*args)ObjectWasDeleted: Attempt to access an object that no longer exists in Houdini.[/CODE]The docs say:This method is deprecated in favor of setParmTemplateGroup.but I fail to see how to remove parms with this method.Any ideas on why I am getting that error and/or how to use this preferred method?Thanks! Quote Link to comment Share on other sites More sharing options...
stevegh Posted October 1, 2013 Author Share Posted October 1, 2013 After more digging I have figured it out. I will post results later for anyone who is curious. Quote Link to comment Share on other sites More sharing options...
stevegh Posted October 1, 2013 Author Share Posted October 1, 2013 More explanation and file here: http://forums.odforc..._12#entry111777 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.