AddCluster (Geometry)
Description
Creates and adds a cluster to the Geometry object. If you do not pass an index array, all the geometry elements will be included in the cluster, and this cluster will always be maintained as complete even when the topology of the geometry changes. To create an empty cluster, pass an empty index array. Otherwise, pass an index array to create the cluster you want.
Notice that some ClusterProperty types can only be added to clusters that are always-complete (see Cluster.IsAlwaysComplete). These types are vertex color, uv and symmetry map properties.
Scripting Syntax
Geometry.AddCluster( Type, [Name], [Indices] )
C# Syntax
Cluster Geometry.AddCluster( String in_Type, String in_name, Object in_Indices );Parameters
|
Parameter |
Type |
Description |
|
Type |
Cluster type |
|
|
Name |
Cluster name. When not specified, the name will be the cluster type. |
|
|
Indices |
Array of indices to add to the cluster. If not specified, an always-complete cluster is created (see Cluster.IsAlwaysComplete). To create an empty cluster, pass an empty array. |
Return Value
Examples
VBScript Example
set oGrid = Application.ActiveProject.ActiveScene.Root.AddGeometry("Grid","MeshSurface")
set oCluster = oGrid.ActivePrimitive.Geometry.AddCluster( siPolygonCluster )
set oCluster2 = oGrid.ActivePrimitive.Geometry.AddCluster( siEdgeCluster, "MyCluster" )
set oCluster3 = oGrid.ActivePrimitive.Geometry.AddCluster( siVertexCluster, "MyCluster3", Array(0,1,9,10) )See Also
Autodesk Softimage v7.5