## ConnectWeightMap

### Introduced

v1.0

### Description

Connects a Weight Map property defined on an object, to an operator applied on that object.

### Scripting Syntax

    ConnectWeightMap( Operator, PropObj );

### Parameters

Parameter | Type | Description
--- | --- | ---
Operator | String | Operator to which the Weight Map property will get connected as an input.
PropObj | String | Weight Map property that will get connected as an input to the operator.

### Examples

#### JScript Example

    /*

    	This example demonstrates how to connect a weight map to the

    	amplitude parameter of the push operator on the same object.

    */

    NewScene(null, false);

    // Set up a grid with a cluster of points in the middle

    CreatePrim("Grid", "MeshSurface");

    SetSelFilter("Vertex");

    SelectGeometryComponents("grid.pnt[20-24,29-33,38-42,47-51,56-60]");

    CreateCluster();

    // Apply the push operator and a weight map

    ApplyOp("Push", "grid", 3, siPersistentOperation, null, 0);

    CreateWeightMap(null, "grid.polymsh.cls.Point");

    // Connect the push operator to the weight map

    ConnectWeightMap( "grid.polymsh.pushop", "grid.polymsh.cls.Point.Weight_Map" );