Search - User list
Full Version: Python: Parameter Operation from a Delete node...
Root » Houdini Indie and Apprentice » Python: Parameter Operation from a Delete node...
froure
Dear friends,

I'm trying to set the parameter called “operation” in a “delete” node to “delete non-selected”. I created the node with

mydelete = parent.createNode('delete')

and deleted the file node. Now, I want to set that parameter, but I don't have the faintest idea about what to pass to

mydelete.parm('operation').set(…)

or anything like that!

Thanks in advance!!

froure.-
graham
Menu parms can be set two different ways. Either the index of the choice, or the menu item name.

Also, the parm name is ‘negate’. HOM expects the parm name, as opposed to the label.

mydelete.parm('negate').set(1) will Delete Non-Selected
mydelete.parm('negate').set('keep') will set Delete Non-Selected

To set it back to default,
mydelete.parm('negate').set(0)
mydelete.parm('negate').set('dele')
mydelete.parm('negate').revertToDefaults()

You can also see the menu entry names in the Edit Parameter Interface window, or by looking at ‘menu_items’ in the ParmTemplate:

mydelete.parm('negate').parmTemplate()
froure
Ok! Thanks for all!

I will try it!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB