opparm command

Gets/sets/manipulates parameters on a node.

Replaced by: hou.Parm

All Usages Options Examples

See also: opadd, opchangetype, opget, opmenu 2 more , opscript, opset

Usages

Different usages let you list the parameters on a node, print the values of parameters, set parameters, and trigger any callbacks associated with parameters.

  1. opparm [-q] -l operator_pattern wildcard

  2. opparm [-q] -L operator_pattern wildcard

    The -l and -L forms print a list of parameters. You can use wild cards in the parameter name.

    -l lists internal (channel) names, -L lists the human-readable labels (where present).

  3. opparm [-q] -d [-x] operator_pattern [-v] [wildcard]

    The -d form prints the values of parameters. You can use wild cards in the parameter name.

    By default, the command prints values of the parameters even if channels with different values exist. Use -v to evaluate the channels at the current time and then print parameter values.

  4. opparm [-q] [-r] [-C] operator_pattern [-v [-p | -i]] parameters value

    This form sets parameter values. If you specify a value, opparm sets the given parameter to that value.

    You can specify a particular component when setting a parameter. You can do this with an index, such as t[0], or with the channel name, such as tx.

  5. opparm [-q] -c operator_name parameter_names

    The -c form executes any callbacks associated with a parameter. If the parameter is a button which executes a callback, use the fourth form to invoke the function. Examples of these types of buttons are in render output drivers (the render buttons).

    If the parameter is a menu with a callback function (such as Initialize in the Creep SOP), and you wish to execute the callback as if a specific menu item had been chosen, use the opparm -C operator_pattern parameters value form of the command with the -C option. Use the opmenu command to determine what are valid menu item values.

Options

-l

(List) prints a list of parameters. The parameter names printed with -l can be used in channel references.

-L

(List descriptions) prints a list of parameter descriptions, as they appear in the interface.

-q

(Quiet) do not print warnings or errors.

-d

Prints parameter values. You can use wildcards in the parameter name.

When you print parameter values, the command prints the animation channels by default. Use -v to print the values at the current time instead.

-x

Only available when you specify -d. Generates a script which can be used to re-create the parameter values (including commands for reproducing the channels).

-v

Normally animation channels of the parameters are deleted when they are changed. Specifying -v when the parameter value is a number prevents the channels from being deleted. Instead the command will behave as if the values were entered into a parameter editor at the current time.

-C

In addition to setting parameter values, trigger any callbacks associated with the parameters.

-r

The opparm command will follow simple channel references and set the referenced parameter instead of deleting the channel reference expression and setting the value in the specified parameter. This is useful when writing scripts to modify parameters of nodes inside custom subnet operators.

-p

If -p is specified with -v, and the value is set at a key, the new parameter is forced into a pending state.

-i

If -i is specified with -v, and the value is set at a key, the new parameter is committed immediately.

-c

Execute any callbacks associated with the given parameter(s). See also the -C option.

-b

Will bypass spare parameters. This is equivalent to deleting the spare parameter for rendering purposes. That is, the spare parameter will not appear to exist to SOHO. The parameter may be re-enabled without loss of channel animation data.

Note

The bypass only works for spare parameters (including properties).

Example

To disable the shop_geometrypath on the object:

opparm -b on obj shop_geometrypath

To enable the parameter:

opparm -b off obj shop_geometrypath 

Examples

opparm -l /obj/geo1 *
opparm geo1 t ( 1 2 3 )
opparm geo1 t[2] ( 3 )
opparm geo1 tz ( 3 )
opparm -C /obj/geo1/creep1 Initialize initfill
opparm -c /out/mantra1 execute
opparm -d geo1 t
opparm -l geo1 *
opparm model -v -p rz ( 4.5 )
opparm model -v -i rz ( 4.5 )