## ConnectOperatorParameter

### Introduced

v4.0

### Description

Connects some operator Parameter's divot to a ProjectItem. Operators define themselves the type of data that can be connected. This connection mechanism is supported only for some parameters of specific operators.
Other parameter connection mechanisms exist, such as texturable parameters (used by Hair primitive). Parameter divots using other connection mechanisms cannot be connected by this command.
Example of parameters which can be connected using this command:
- Push Op (similar to most deform operators):
Parameter "ampl" can be connected to a Weight Map cluster property or to an Envelope Weight cluster property.
- Polygon Reduction Op:
Parameter "vertexclusterweight" can be connected to a Vertex cluster.

### Scripting Syntax

    ConnectOperatorParameter( Parameter, ProjObj );

### Parameters

Parameter | Type | Description
--- | --- | ---
Parameter | String | Name of the parameter to connect as input.
ProjObj | String | ProjectItem to be connected to the parameter.

### Examples

#### JScript Example

    //Create a grid and apply to it a push deform

    NewScene(null, null);

    Grid = CreatePrim("Grid", "MeshSurface", null, null);

    Op = ApplyOp("Push", "grid", 3, siPersistentOperation);

    SetValue(String(Op)+".ampl", 1, null);

    //Create a weight map and set some values

    WeightMap = CreateWeightMap(null, null, "Weight_Map", null, null);

    PaintWeights(WeightMap, Array(40, 49), Array(-1, -1), 0, 0, null);

    //Connect push op's amplitude parameter to the weight map

    ConnectOperatorParameter(String(Op)+".ampl", String(WeightMap));

    //Disconnect weight map from amplitude parameter

    DisconnectOperatorParameter(String(Op)+".ampl");

### See Also

DisconnectOperatorParameter