[Sidefx-houdini-list] no kwargs in menu scripts! work-arounds any body?

Edward Lam edward at sidefx.com
Fri Apr 16 09:15:08 EDT 2010

Robert Kelly wrote:
> I am coming up against the same problem again. There is no kwargs in
> menu scripts. so if your writing a menu script in python that is on a
> multi-parm the script wont know what parameter it is on.

Houdini 10.0.231: Wed Mar 25 18:46:31 EDT 2009
     In callback scripts for parameters it's often hard to determine the
     multiparm instance index, but also often required.

     There are new variables set during the parameter callback process.
     In addition to $script_parm and $script_value, the new variables:

     - $script_multiparm_nesting: An integer representing all the
       multi-parm nesting level of the parameter.

     - $script_multiparm_index: The instance number of the inner most
       nesting level.
     - $script_multiparm_index2: When the nesting level is greater than
       1, this returns the second innermost index number.
     - $script_multiparm_indexN: The index in the outermost multiparm

     Note: $script_multiparm_index2 and beyond are only set if the
           nesting level warrants them.

     If the parameter is not nested in a multi-parm, then
	- $script_multiparm_nesting will be 0
	- $script_multiparm_index will be -1


More information about the Sidefx-houdini-list mailing list