Python: Parameter Operation from a Delete node...

   7115   2   0
User Avatar
Member
15 posts
Joined: April 2008
Offline
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.-
User Avatar
Member
1925 posts
Joined: Nov. 2006
Offline
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()
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
15 posts
Joined: April 2008
Offline
Ok! Thanks for all!

I will try it!
  • Quick Links