TransferClusterPropertiesAcrossGenOp

導入

v4.0

カテゴリ

operator

詳細

ジェネレータ オペレータの指定の入力オブジェクトのクラスタ プロパティのセットを、指定の出力オブジェクトに新規クラスタ プロパティとして転送します。

注: プロパティのみを転送するには(例: マテリアル) TransferPropertiesAcrossGenOp コマンドを使用します。: TransferPropertiesAcrossGenOp コマンドを使用します。

スクリプト構文

oReturn = TransferClusterPropertiesAcrossGenOp( Operator, Object, ClusterPropsToTransfer, ClusterPropertyName, RebindClusterProperties );

戻り値

作成された ClusterProperty を戻します。

パラメータ

パラメータ タイプ 詳細
オペレータ 文字列 クラスタ プロパティの転送を実行するジェネレータ オペレータを指定します。
オブジェクト 文字列 新しいクラスタ プロパティを追加する出力オブジェクトを指定します。
ClusterPropsToTransfer 選択リスト 新しいクラスタ プロパティに転送するクラスタ プロパティを指定します。
ClusterPropertyName 文字列 新しいクラスタ プロパティの名前を指定します。
RebindClusterProperties ブール True は、新しいクラスタ プロパティを参照できる転送済みのプロパティが、名前でプロパティを参照するように更新されていることを意味します。

注: 現在は実装されていません。

デフォルト値: True

1. VBScript の例

'This example transfers cluster properties across generator 
'operators that admit transfer of cluster properties.
Dim l_MeshMergeOp
newscene ,false
'Create objects
CreatePrim "Grid", "MeshSurface", "grid"
CreatePrim "Grid", "MeshSurface", "grid1"
Translate "grid1", 8.2, 0, 0, siRelative, siView, siObj, siXYZ
'Add cluster property: weight map on both objects.
SelectObj "grid", , True
ActivateVertexSelTool
AddToSelection "grid.pnt[48-51,57-60,66-69]", , True
CreateWeightMap , , "Weight_Map"
SelectObj "grid1", , True
ActivateVertexSelTool
AddToSelection "grid1.pnt[20-25,29-34,38-43,47-52]", , True
CreateWeightMap , , "Weight_Map"
SetValue "Views.ViewA.TopCamera.camvis.objctrlpropmaps", True
' Apply merge operator. 
set l_MeshMergeOp = ApplyGenOp( "MeshMerge", , "grid,grid1", 3, siPersistentOperation, siKeepGenOpInputs )
SetValue "polymsh.polymsh.mergemesh.tolerance", 2.0
Translate , -4.0, 3.0, -0.0, siRelative, siView, siObj, siXYZ
' Transfer properties acrros merge operator.
TransferClusterPropertiesAcrossGenOp "polymsh.polymsh.mergemesh", "polymsh", _
"grid.polymsh.cls.Point.Weight_Map,grid1.polymsh.cls.Point.Weight_Map", "Weight_Map_Gen", True
' View results.  
SetDisplayMode "Camera", "texturedecal"
SetValue "Camera.camvis.objctrlpropmaps", True
ActivateObjectSelTool
SelectObj "grid"
AddToSelection "grid1", , True
AddToSelection l_MeshMergeOp(0)

2. JScript の例

//This example transfers cluster properties across generator 
//operators that admit transfer of cluster properties.
NewScene( null, false )
//Create objects
CreatePrim("Grid", "MeshSurface", "grid", null);
CreatePrim("Grid", "MeshSurface", "grid1", null);
Translate( "grid1", 8.2, 0.0, 0.0, 
        siRelative, siView, siObj, siXYZ, 
        null, null, null, null, null, null, null, null, null);
//Add cluster property: weight map on both objects.
SetSelFilter("Point");
AddToSelection("grid.pnt[20-23,29-32,38-41,47-50,56-59]", null, true);
CreateWeightMap(null, null, "Weight_Map", null, null);
SelectObj("grid1", null, true);
ActivateVertexSelTool(null);
AddToSelection("grid1.pnt[30-32,39-41,48-50]", null, true);
CreateWeightMap(null, null, "Weight_Map", null, null);
//Apply merge operator. 
ApplyGenOp("MeshMerge", "", "grid,grid1", 3, siPersistentOperation, siKeepGenOpInputs);
SetValue("polymsh.polymsh.mergemesh.tolerance", 2, null);
Translate( "polymsh", -4.0, 4.0, -5.0, 
        siRelative, siView, siObj, siXYZ, 
        null, null, null, null, null, null, null, null, null);
//Transfer cluster properties across the merge operator.
TransferClusterPropertiesAcrossGenOp(
        "polymsh.polymsh.mergemesh", 
        "polymsh",      
        "grid.polymsh.cls.Point.Weight_Map, grid1.polymsh.cls.Point.Weight_Map",
        "Weight_Map_Gen", 
        true);
//View results.  
SelectObj("grid", null, true);
AddToSelection("grid1", null, true);
AddToSelection("polymsh", null, true);
SetValue("Camera.camvis.objctrlpropmaps", true, null);
SetDisplayMode("Camera", "shaded");

関連項目

TransferPropertiesAcrossGenOp TransferAllPropertiesAcrossGenOp CopyAnimationAcrossGenerator