ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.

概要

geometryAttrInfo [-boundingBox] [-components] [-groupId int] [-matrix] [-pointCount] [-pointIndices] [-points] attribute

geometryAttrInfo は、取り消し可能、照会不可能、および編集不可能です。

このコマンドは、アトリビュート内のジオメトリに関する情報を提供します。したがって、このコマンドはジオメトリを含むアトリビュートにのみ作用します。頂点の数、バウンディング ボックス、存在する groupTags など、さまざまなタイプの情報をリクエストできます。

リクエストは、ジオメトリのサブセットに対して行うことができます。ジオメトリのサブセットは、特定のグループ ID または groupTag エクスプレッションによって限定されます。たとえば、groupTag エクスプレッションを使用している場合は、リクエストされたインデックスを使用して、このエクスプレッションで定義されたサブセットが照合されます。

戻り値

Anyアトリビュート内のジオメトリに関する情報です。返される値の数および型は、情報リクエストによって決まります。

関連

attributeQuery, getAttr, listAttr

フラグ

boundingBox, components, groupId, matrix, pointCount, pointIndices, points
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
-boundingBox(-bb) create
ジオメトリのバウンディング ボックスを返します。
-components(-cmp) create
ジオメトリのコンポーネントを返します。
-groupId(-gid) int create
照会するグループ ID を指定します。指定した場合、情報リクエストに対する回答として返されるのは、このグループ ID に含まれるジオメトリのサブセットに限定されます。
-matrix(-mtx) create
ジオメトリに関連付けられた行列を返します。
-pointCount(-pc) create
ジオメトリのポイント数を返します。
-pointIndices(-pi) create
ジオメトリのインデックスを返します。
-points(-pnt) create
ジオメトリのポイントのリストを返します。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます コマンド内でフラグを複数回使用できます。

MEL 例

    polyCylinder -r 1 -h 6 -sx 4 -sy 5 -sz 1 -name myGeo;
    select myGeo.vtx[12:23] myGeo.vtx[25];
    string $clusterList[]=`cluster`;
    move -absolute 1.0 0 0 $clusterList[1];

    // Find the groupId for the cluster node to test our queries
    int $gid = `getAttr ($clusterList[0] + ".input[0].groupId")`;

    // Get the number of points
    int $n0 = `geometryAttrInfo -pc myGeo.outMesh`;
    int $n1 = `geometryAttrInfo -pc -gid $gid myGeo.outMesh`;

    print ("Deforming " + $n1 + " out of " + $n0 + " points\n");
    // Deforming 13 out of 26 points

    // Get the indices that are being deformed
    geometryAttrInfo -pi -gid $gid myGeo.outMesh;
    // Result: 12 13 14 15 16 17 18 19 20 21 22 23 25 //

    // Get the components that are being deformed
    geometryAttrInfo -cmp -gid $gid myGeo.outMesh;
    // Result: vtx[12:23] vtx[25] //

    // Get the bounding box of the total geometry
    geometryAttrInfo -bb myGeo.outMesh;
    // Result: -1 2 -3 3 -1 1 //

    // Get the bounding box of what is being deformed
    geometryAttrInfo -bb -gid $gid myGeo.outMesh;
    // Result: 0 2 0.6 3 -1 1 //