Parameter.Connect
 
 
 

Parameter.Connect

Introduced

v2.0

Description

Connects a Shader object to the parameter.

C# Syntax

DataSource Parameter.Connect( DataSource in_pDataSource );

Scripting Syntax

oReturn = Parameter.Connect( DataSource );

Return Value

Previously connected Shader object

Parameters

Parameter Type Description
DataSource Shader The Shader DataSource to use for the new connection

Examples

VBScript Example

'
' This example illustrates how to connect a phong shader to a
' material manually.
'
NewScene , false
set grid = Application.ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" )
set mat = grid.AddMaterial
set surface = mat.Parameters("Surface")
set phong = surface.ConnectFromProgID( "Softimage.material-phong.1" )
set shadow = mat.Parameters("Shadow")
call shadow.Connect( phong )
set photon = mat.Parameters("Photon")
call photon.Connect( phong )

See Also

FCurve Shader Expression Parameter.ConnectFromFile Parameter.ConnectFromPreset Parameter.ConnectFromProgID SceneItem.AddMaterial Parameter.Disconnect Shader Presets