## SIApplyShaderToCnxPoint2

### Introduced

v9.0 (2011)

### Description

Creates a shader from a progid and connects it to the specified shader connection points. This command is the same as SIApplyShaderToCnxPoint except that it takes a ProgID instead of a Preset.

### Scripting Syntax

    oReturn = SIApplyShaderToCnxPoint2( ProgID, [InputObjs], [Name], [Value] );

### Return Value

Returns the shader as either a Shader object (eg., when the shader is connected to a scene object) or a CollectionItem (eg., when the shader is connected to a pass).

### Parameters

Parameter | Type | Description
--- | --- | ---
ProgID | String (see Shader.ProgID) | Any of the appropriate shader definition ProgIDs
InputObjs | String | List of shader connection points. Default Value: Current selection
Name | String | Name of the shader Default Value: If not specified, the name is automatically generated.
Value | Boolean | True to disconnect the previous shader, False to keep the previous shader Default Value: True

### See Also

SIApplyShaderToCnxPoint