フレームを表示
ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.
polyEvaluate [-accurateEvaluation] [-area] [-boundingBox] [-boundingBox2d] [-boundingBoxComponent] [-boundingBoxComponent2d] [-displayStats] [-edge] [-edgeComponent] [-face] [-faceComponent] [-format] [-shell] [-triangle] [-triangleComponent] [-uvComponent] [-uvSetName string] [-uvcoord] [-vertex] [-vertexComponent] [-worldArea]
[poly poly...]
polyEvaluate は、取り消し可能、照会不可能、および編集不可能です。
指定したオブジェクトで必要なカウントを返します。
コマンド ラインでオブジェクトを指定しない場合は、アクティブ リストのオブジェクトを使用します。
MEL では、値はフラグを設定したときと同じ順序で返されます。Python には引数の順序という概念はないため、項目はキー設定された辞書にフラグ名の順で戻されます。Python では、要求された項目が 1 つだけの場合、辞書には返されません。
使いやすくするために、フラグを設定しなければ、すべての値がエコーされます。
-fmt/format を除くすべてのフラグは照会フラグです。使いやすくするため、-q フラグは省略できます。
フォーマットしない出力の注意事項は以下のとおりです。
- 3D バウンディング ボックスは 3 つの float で、2D バウンディング ボックスは 2 つの float で返されます。
-
バウンディング ボックスを照会したのに計算できない場合は(たとえば、コンポーネントが選択されていないコンポーネント バウンディング ボックス、マッピングされていないオブジェクトの 2D バウンディング ボックスなど)、それぞれの配列要素に 0 が返されるため、出力配列のインデックスは一貫性を保ちます。
-
int 値(トポロジ フラグで照会)は、float 値(バウンディング ボックス フラグで照会)と混在できません。このため、フラグを設定しないと int 値のみが返されます。
Any | 要求されたフォーマット、およびコール元の言語に応じて、値の MEL 配列、Python 辞書、または文字列。 |
polyInfo
accurateEvaluation, area, boundingBox, boundingBox2d, boundingBoxComponent, boundingBoxComponent2d, displayStats, edge, edgeComponent, face, faceComponent, format, shell, triangle, triangleComponent, uvComponent, uvSetName, uvcoord, vertex, vertexComponent, worldArea
ロング ネーム(ショート ネーム) |
引数タイプ |
プロパティ |
|
-accurateEvaluation(-ae)
|
|
|
|
バウンディング ボックスの計算で正確な結果を出すために使用します。頂点の数が多いオブジェクトでは、正確な評価に時間がかかります。
|
|
-area(-a)
|
|
|
|
ローカル空間にあるオブジェクトのフェースのサーフェス領域を float で返します。
|
|
-boundingBox(-b)
|
|
|
|
3D 空間のオブジェクトのバウンディング ボックスを、MEL では 6 つの float (xmin xmax ymin ymax zmin zmax)として、Python では 3 組のタプル[((xmin,xmax),(ymin,ymax),(zmin,zmax))]として返します。
|
|
-boundingBox2d(-b2)
|
|
|
|
2D 空間の(指定されていない場合は現在のマップに対する)オブジェクトの UV バウンディング ボックスを、MEL では 4 つの float (xmin xmax ymin ymax)として、Python では 3 組のタプル[((xmin,xmax),(ymin,ymax),(zmin,zmax))]として返します。
|
|
-boundingBoxComponent(-bc)
|
|
|
|
3D 空間で選択したコンポーネントのバウンディング ボックスを、MEL では 6 つの float (xmin xmax ymin ymax zmin zmax)として、Python では 3 組のタプル[((xmin,xmax),(ymin,ymax),(zmin,zmax))]として返します。
|
|
-boundingBoxComponent2d(-bc2)
|
|
|
|
2D 空間で選択した UV 座標のバウンディング ボックスを、MEL では 4 つの float ( xmin xmax ymin ymax)として、Python では 2 組のタプル[((xmin,xmax),(ymin,ymax))]として返します。
|
|
-displayStats(-ds)
|
|
|
|
アクティブなビューのポリゴン統計の表示/非表示を切り替えます。このフラグを指定すると、その他すべてのフラグは無視されます(サポートしていません。headsUpDisplay コマンドを参照してください)。
|
|
-edge(-e)
|
|
|
|
-edgeComponent(-ec)
|
|
|
|
選択したエッジのオブジェクトの数を整数で返します。
|
|
-face(-f)
|
|
|
|
-faceComponent(-fc)
|
|
|
|
選択したフェースのオブジェクトの数を整数で返します。
|
|
-format(-fmt)
|
|
|
|
-shell(-s)
|
|
|
|
シェル(切断されている断片)の数を整数で返します。
|
|
-triangle(-t)
|
|
|
|
-triangleComponent(-tc)
|
|
|
|
選択したコンポーネントの三角形の数を整数で返します。
|
|
-uvComponent(-uvc)
|
|
|
|
選択した UV 座標のオブジェクトの数を整数で返します。
|
|
-uvSetName(-uvs)
|
string
|
|
|
UV セットを指定するためにテクスチャ頂点を照会するときに使用します。UV セットが指定されていない場合は、オブジェクトの現在のマップが使用されます。
|
|
-uvcoord(-uv)
|
|
|
|
UV 座標の数(指定されていない場合は現在のマップ)が整数で返されます。
|
|
-vertex(-v)
|
|
|
|
-vertexComponent(-vc)
|
|
|
|
-worldArea(-wa)
|
|
|
|
ワールド空間にあるオブジェクトのフェースのサーフェス領域を float で返します。
|
|
フラグはコマンドの作成モードで表示できます
|
フラグはコマンドの編集モードで表示できます
|
フラグはコマンドの照会モードで表示できます
|
コマンド内でフラグを複数回使用できます。
|
polyPlane -n plg -sx 4 -sy 4 -w 5 -h 5;
select plg.f[2] plg.f[4];
// query the number of faces
polyEvaluate -f;
// Result: 16
// query the number of triangles
polyEvaluate -t;
// Result: 32
// query the number of selected faces
polyEvaluate -faceComponent;
// Result: 2
// query the number of vertices and faces
polyEvaluate -v -f;
// Result: 25 16
// formatted query of the number of vertices and faces
polyEvaluate -v -f -fmt;
// Result: vertex=25 face=16
// query all
polyEvaluate;
// Result: 25 40 16 25 32 1 0 0 2 0
//formatted query of all information
polyEvaluate -fmt;
// Result: vertex=25 edge=40 face=16 uvcoord=25 triangle=32 shell=1
// vertexComponent=0 edgeComponent=0 faceComponent=2 uvComponent=0
// boundingBox= X[-2.50,2.50] Y[0.00,0.00] Z[-2.50,2.50]
// boundingBoxComponent= X[-2.50,1.25] Y[0.00,0.00] Z[0.00,2.50]
// boundingBox2d= U[0.00,1.00] V[0.00,1.00]
// boundingBoxComponent2d= U[0.00,0.75] V[0.00,0.50]
// area=25.00 worldArea=25.00
// accurate bounding box evaluation
polyCylinder -r 1 -h 2 -sx 20 -sy 1 -sz 1 -ax 0 1 0 -cuv 1 -ch 1;
// Result: pCylinder1 polyCylinder1 //
rotate -r -os 38.340875 0 0 ;
rotate -r -os 0 0 -36.177835 ;
polyEvaluate -b;
// Result: -1.397482 1.397482 -1.716432 1.716432 -1.651247 1.651247 //
polyEvaluate -b -ae;
// Result: -1.397482 1.397482 -1.407107 1.407107 -1.359833 1.359833 //
// Local and World Space Area
polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 0 1 -tx 1 -ch 1;
setAttr "pCube1.scaleY" 2;
polyEvaluate -a;
// Result: 6
polyEvaluate -wa;
// Result: 10