Cluster.IsAlwaysComplete operator

導入

v5.0

詳細

常に完全なクラスタとしてクラスタを保持する場合は True を戻します。常に完全なクラスタは常にGeometryの全コンポーネントを完備します。モデリング操作で新しいコンポーネントをを追加する場合も同様です。ただし、ジオメトリの全コンポーネントを含むクラスタが必ずしも常に完全であるとは限りません。常に完全なクラスタを作成する方法については、Geometry.AddClusterを参照してください。

一部のClusterPropertyタイプは常に完全なクラスタに追加できるのみです。頂点カラーのタイプは、UVと対称マッププロパティです。

注:常に完全なクラスタからエレメントを削除することはできません。

スクリプト 構文

oBoolean = Cluster.IsAlwaysComplete();

戻り値

Boolean

JScript の例

NewScene(null);
// Create a 1X1 grid. Such geometry only have 4 sampled points: 0,1,2,3.
oGrid = CreatePrim("Grid", "MeshSurface", null, null);
SetValue("grid.polymsh.geom.subdivu", 1, null);
SetValue("grid.polymsh.geom.subdivv", 1, null);
// Add a sampled point cluster covering all sampled points. By passing an
// explicit array, it will create a cluster which is not always complete.
oCluster = oGrid.ActivePrimitive.Geometry.AddCluster( siSampledPointCluster,"NonCompleteCluster",Array(0,1,2,3));
logmessage("Is cluster " + oCluster + " complete? " + (oCluster.IsAlwaysComplete() ? "yes" : "no"));
// Add a sampled point cluster covering all sampled points. By passing no 
// explicit array, it will create a cluster which is always complete.
oCompleteCluster = oGrid.ActivePrimitive.Geometry.AddCluster( siSampledPointCluster,"CompleteCluster" );
logmessage("Is cluster " + oCompleteCluster + " complete? " + (oCompleteCluster.IsAlwaysComplete() ? "yes" : "no"));
try
{
        oProperty = oCluster.AddProperty("Texture Projection", false, "UV Property");
}
catch( e )
{
        logmessage("Error; can't add a UV cluster property on cluster" + oCluster);
}
oProperty = oCompleteCluster.AddProperty("Texture Projection", false, "UV Property");
logmessage("UV cluster property " + oProperty + " was added to complete cluster " + oCompleteCluster);
// The output of this script is:
//
//INFO : Is cluster grid.polymsh.cls.NonCompleteCluster complete? no
//INFO : Is cluster grid.polymsh.cls.CompleteCluster complete? yes
//ERROR : 2000 - The cluster property could not cannot be added. This type of cluster property requires the parent cluster to be always complete. See "AddProperty" method reference for more information about this.
//INFO : Error; can't add a UV cluster property on clustergrid.polymsh.cls.NonCompleteCluster
//INFO : UV cluster property grid.polymsh.cls.CompleteCluster.UV_Property was added to complete cluster grid.polymsh.cls.CompleteCluster

関連項目

Geometry.AddCluster SceneItem.AddProperty