## siShaderParameterAttribute

### Introduced

v9.0 (2011)

### Description

Sets an attribute on the shader parameter definition. For example, to set a filter on a shader parameter definition of type reference, use siReferenceFilterAttribute as the attribute name and one of the siShaderReferenceFilterType values when calling the SetAttribute method. The filter restricts which items the user can select with the widget.

### C# Syntax

    StringModule.siReferenceFilterAttribute                                     // ReferenceFilter

    StringModule.siPropertyFilterAttribute                                      // PropertyFilter

    StringModule.siCustomTypeNameAttribute                                      // CustomTypeName

    StringModule.siShaderFamilyAttribute                                        // ShaderFamily

    StringModule.siDefaultConnectionAttribute                                   // DefaultConnection

    StringModule.siWritableImageAttribute                                       // WritableImage

    StringModule.siWritableImageTypeAttribute                                   // WritableImageType

    StringModule.siRenderTreeNodeColorRAttribute                                // RenderTreeNodeColorR

    StringModule.siRenderTreeNodeColorGAttribute                                // RenderTreeNodeColorG

    StringModule.siRenderTreeNodeColorBAttribute                                // RenderTreeNodeColorB

    StringModule.siUseRenderTreeLayoutPortDisplayNamesAttribute                 // UseRenderTreeLayoutPortDisplayNames

    StringModule.siRecompileMetaSLOnValueChange                                 // RecompileMetaSLOnValueChange

    StringModule.siCAVTangentsAttribute                                         // Tangents

    StringModule.siCAVBinormalsAttribute                                        // Binormals

Constant | Value | Description
--- | --- | ---
siReferenceFilterAttribute | ReferenceFilter | Type of filter for a shader's reference parameter type. Set one of the siShaderReferenceFilterType enum values.
siPropertyFilterAttribute | PropertyFilter | Type of filter for a shader's property parameter type. Set one of the siShaderPropertyFilterType enum values.
siCustomTypeNameAttribute | CustomTypeName | Type of filter for a shader's custom type. Set one of the siShaderCustomDataType enum values.
siShaderFamilyAttribute | ShaderFamily | Type of filter for a shader's family.
siDefaultConnectionAttribute | DefaultConnection | Default connection to make when a shader is dropped on a port or an existing connection. Valid for input and outputs.
siWritableImageAttribute | WritebleImage | Type of filter for a writable image.
siWritableImageTypeAttribute | WritableImageType | Type of filter for a writable image type.
siRenderTreeNodeColorRAttribute | RenderTreeNodeColorR | Type of filter to match the Red color for a RenderTree node.
siRenderTreeNodeColorGAttribute | RenderTreeNodeColorG | Type of filter to match the Green color for a RenderTree node.
siRenderTreeNodeColorBAttribute | RenderTreeNodeColorB | Type of filter to match the Blue color for a RenderTree node.
siUseRenderTreeLayoutPortDisplayNamesAttribute | UseRenderTreeLayoutPortDisplayNames | Controls which display name to use in the Render Tree layout when no layout is given. By default, the ports will use the script name. Set this attribute to true to use the display name from the PPG.
siRecompileMetaSLOnValueChange | RecompileMetaSLOnValueChange | When this attribute is set to true and the parameter value changes, the MetaSL viewport shader will be recompiled. This is needed when the number of light casting shadows changes or when switching light types.
siCAVTangentsAttribute | Tangents | When this attribute is set to true, tangent data will be generated for this property for the MetaSL viewport shader.
siCAVBinormalsAttribute | Binormals | When this attribute is set to true, binormal data will be generated for this property for the MetaSL viewport shader.

### Applies To

ShaderParamDefOptions.SetAttribute MetaShaderRendererDef.RendererOptions ShaderParamDefOptions::SetAttribute Refining UI Controls for Parameter Definitions

### See Also

siShaderReferenceFilterType siShaderPropertyFilterType siShaderCustomDataType