Jump to content

Remove user added parms: Python


stevegh

Recommended Posts

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...