代表一个用户控制的参数。
参数节点代表着参数值,用户可以在材质参数中设置它。如,在 Balloon 材质中,你应当定义一个用于 Balloon 颜色的参数,允许用户控制材质的颜色。
Parameters
Parameter Type | Specifies the VEX data type of the new parameter. It can also specify how the parameter should be represented in an OP dialog. For example, a VEX vector can be viewed as 3 float values or as a color value. | ||||||
Parameter Name | The name of the new parameter, both in the VEX function declaration, the definition of any OP type that uses the VOPNET, and the VOP tile’s output. If a parameter by this name already exists, this operator will reference it and will disable most of of its own fields, such as the Parameter Type and Parameter Label. The name must not be a reserved keyword. | ||||||
Use This Node to Set Parameter Attributes | When several Parameter VOPs have the same Parameter Name, only one of the nodes is used to control the attributes of the parameter. Houdini decides which node to use for this by searching all the nodes according to the user defined order, then traversing inside subnets. If none of them have this parameter turned on, the first one found is used to set the parameter attributes. If one or more do have this option turned on, the first one with this option is used, even if another node (with this option turned off) is found first. | ||||||
Parameter Label | A human-readable label for this parameter. Appears in the parent node’s parameters and the tooltip when the user hovers over the output on the VOP tile. | ||||||
Use Input Value If Parameter Not Bound | If true, the VEX function parameter is checked to see if it is bound to an attribute in the current VEX context (e.g. point color). If not bound, the input value is is assigned to the VEX parameter. In a Surface VOP context, a VEX parameter is bound if the geometry being shaded has an attribute with the VEX parameter name. | ||||||
Export | Specifies whether the new parameter can be exported to other contexts (written to as well as read from). If set toAlways or When Input is Connected, this operator gets an input. The value wired into this input is then assigned to the exported parameter. In a Surface network, exported parameters can be used to create deep rasters. In SOP and POP networks, the exported parameters create new geometry attributes.
| ||||||
Invisible | Do not show the parameter in the shader’s parameter interface. The parameter still exists and will be used to generate shader strings. | ||||||
Provide Menu of Choices | If the parameter type is String or Integer, check this toggle to provide a menu of choices instead of a string entry field or an integer slider. | ||||||
Menu Choices | A list of pairs of strings. The first string in each pair is the parameter value if that menu item is chosen. The second string is the label that appears in the dialog for that menu item. The strings are separated by spaces. If you want a value or label to contain a space, surround the item with double quotes. |
Callback script | HScript or Python script to run when this parameter is changed by a UI event (or when the button is clicked, ifType is Button). If your script is written in HScript, the name of the changed parameter is available in $script_parm, and the value is in $script_value. If the parameter has multiple components, you can access them as $script_value0,$script_value1, and so on. If your script is written in Python, the same variables are accessible via a dictionary variable named kwargs. SeeParameter Callback Scripts for more information. For example, this HScript callback command would open a small window showing the path to the operator and the name of the parameter plus the new value: message `oppwf()`/$script_parm = $script_value0 Often, you will call a script stored as a section (an embedded file) in a digital asset. For an object type namedasset_name, you can run the script in the section namedsection_name using the following command as the callback: source opdef:/Object/asset_name?section_name See how to access the contents of an asset and the sourcecommand. |
Help text | Help string for the parameter. This is displayed in the tool tip when the user hovers over this parameter in the parameter editor. |
Default Values | Depending on the parameter type selected, it represents the default value of the parameter in the VEX function and in the OP type that uses this VOP network. |
Inputs
Unbound or Export Value | The value assigned to the new parameter if the Export Parameter toggle is checked or if the parameter is not bound when Use Input Value If Parameter Not Boundis checked. |
Outputs
Parameter | The value of this VEX function parameter. |
Is Parameter Bound | True if the new parameter is bound to an attribute. |