TransferClusterPropertiesAcrossGenOp

Introduced

v4.0

Categories

operator

Description

Transfers a set of cluster properties from the specified input objects on a generator operator to a specified output object as a new cluster property.

Note: To transfer properties (ex.: materials) alone, use the TransferPropertiesAcrossGenOp command.

Scripting Syntax

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

Return Value

Returns the created ClusterProperty.

Parameters

Parameter Type Description
Operator String Specifies the generator operator on which the cluster property transfer will be performed.
Object String Specifies an output object to which the new cluster property will be added.
ClusterPropsToTransfer Selection list Specifies the cluster properties to transfer to the new cluster property.
ClusterPropertyName String Specifies the name of the new cluster property.
RebindClusterProperties Boolean True implies that the properties already transferred which may refer to the new cluster property are updated to refer to it by name.

Note: Currently not implemented.

Default Value: True

Examples

1. VBScript Example

'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 Example

//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");

See Also

TransferPropertiesAcrossGenOp TransferAllPropertiesAcrossGenOp CopyAnimationAcrossGenerator