## ShaderParamDefContainer.AddParamDef

### Introduced

v9.0 (2011)

### Description

Adds a ShaderParamDef to this container.
Warning: You must specify any characteristics such as display name, capabilities, value range, etc. for this parameter definition on the ShaderParamDefOptions object before calling this method.
Note: This method could return an invalid object in python, use ShaderParamDefContainer.AddParamDef2 instead.

### C# Syntax

    ShaderParamDef ShaderParamDefContainer.AddParamDef( String in_ParameterName, Object in_ParameterType, ShaderParamDefOptions in_Options );

### Scripting Syntax

    oReturn = ShaderParamDefContainer.AddParamDef( in_ParameterName, in_ParameterType, in_Options );

### Return Value

ShaderParamDef or ShaderStructParamDef

### Parameters

Parameter | Type | Description
--- | --- | ---
in_ParameterName | String | The registered name for the new parameter. On an instance of this parameter definition (ShaderParameter), this value is will be returned when you call the Parameter.ScriptName property. To set the label you see in the UI for this parameter, use the ShaderParamDefOptions.SetLongName method. To set the ShaderParamDef.DisplayName, use the ShaderParamDefOptions.SetShortName method.
in_ParameterType | String or siShaderParameterDataType | The type of shader parameter to create. If a string is passed, it can refer to either the string version of any of the siShaderParameterDataType values or a custom data type that has been registered with XSIApplication.RegisterShaderCustomParameterType.
in_Options | ShaderParamDefOptions | Options for this shader parameter definition. Use the XSIFactory.CreateShaderParamDefOptions method to create the options as a ShaderParamDefOptions object.

### See Also

ShaderParamDefContainer.AddArrayParamDef Adding Parameter Definitions