v4.0
一部のオペレータ パラメータのコネクタを ProjectItem に接続します。 オペレータは接続できるデータ型を自身で定義します。 この接続メカニズムは、特定のオペレータの一部のパラメータでのみサポートされています。
これ以外にもパラメータ接続のメカニズムは存在します。たとえば、Hair プリミティブが使用するテクスチャ化可能なパラメータなどです。 異なる接続メカニズムを使用するパラメータのコネクタは、このコマンドでは接続できません。
このコマンドで接続できるパラメータの例:
- Push Op (ほとんどのデフォーム オペレータと類似):
パラメータ「ampl」は、Weight Map クラスタ プロパティまたは Envelope Weight クラスタ プロパティに接続できます。
- Polygon Reduction Op:
パラメータ「vertexclusterweight」は、Vertex クラスタに接続できます。
ConnectOperatorParameter( Parameter, ProjObj ); |
| パラメータ | タイプ | 説明 |
|---|---|---|
| Parameter | 文字列 | 入力として接続するパラメータの名前。 |
| ProjObj | 文字列 | ProjectItem パラメータに接続する。 |
//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"); |