値 > コレクション > コレクションのタイプ > EdgeSelection 値 |
EdgeSelection は、シーン メッシュ ノードに対するエッジのセットを仮想配列で表します。
インデックスでエッジをアクセスしたり、エッジを反復したり、マップした関数をエッジに適用することができます。
「編集可能メッシュ」も参照してください。
エッジ配列はダイナミックであるため、その内容はメッシュ ノードのエッジあるいは選択されたエッジが変更されると変化します。
EdgeSelection 値はマップ可能です。
コンストラクタ:
<mesh>.selectedEdges
メッシュ オブジェクトの現在選択されているエッジです。
<mesh>.Edges
メッシュ オブジェクトのすべてのエッジ、読み込み専用です。
プロパティ
<edgeselection>.count : Integer, read-only
エッジ配列内のエッジの数を返します。
<edgeselection>.selSetNames : Array of names, read-only
EdgeSelection が関連付けられているオブジェクトに関する、現在のエッジ レベルの名前がついた選択セットの名前の配列を返します。
次のプロパティは、単独の選択項目($foo.edges[n] の形式)で使われます。
<edgeselection>.index : Integer, read-only
メッシュ内の選択された要素のインデックスを返します。
例: |
$foo.selectedEdges[2].index --returns the edge index of the 2nd edge in the current selection. |
選択項目間を繰り返すと、ループ内で単一の項目を選択できます。
例: |
se = for i in $foo.selectedVerts collect i.index --se contains selected edges as array |
演算子
<mesh>.selectedEdges = (<array> | <bitarray>)
指定されたエッジを選択します。
<edgeselection>[<integer>]
インデックスで指定されたエッジを単独の EdgeSelection として取得します。インデックスは 1 から始まります。
<edgeselection>[(<integer_array> | <bitarray>)]
インデックスで指定されたエッジを EdgeSelection として取得します。インデックスは 1 から始まります。
<edgeselection>[(<#name> | <string>)]
エッジ レベルの名前が付いた選択セットを取得します。選択セットの名前は、名前または文字列値で指定できます。
<edgeselection>[(<#name> | <string>)] = (<faceselection> | <integer_array> | <bitarray>)
エッジ レベルの名前が付いた選択セットを指定されたエッジに設定します。
選択セットの名前は、名前または文字列値で指定できます。また、エッジは、配列、bitArray、または同じオブジェクトの EdgeSelection で指定できます。
メソッド
move <edgeselection> <point3>
EdgeSelection のエッジを移動します。
select <edgeselection>
EdgeSelection のエッジを選択します。
deselect <edgeselection>
EdgeSelection のエッジを選択解除します。
delete <edgeselection>
EdgeSelection のエッジを削除します。
append <edgeselection> (<edgeselection> | <integer>)
EdgeSelection にエッジを付加します。
findItem <edgeselection> (<edgeselection[<integer>] | <integer>)
一致する項目がある場合は選択インデックス、ない場合は 0 (ゼロ)を返します。項目は選択インデックスまたは単独の EdgeSelection です。
例: |
-- move edges in 'mouth' named selection set move $foo.edges[#mouth] [0,0,10] -- select edges in 'front edges' set select $baz.edges["front edges"] -- set 'baz' named selection set to given edges $foo.edges[#baz] = #(1,3,4,5,10) -- set 'cursel' set to current selection $baz.edges[#cursel] = $baz.selectedEdges -- all the names of the edge-level named selection sets for object $foo $foo.edges.selSetNames -- print out all edge-level named selection sets for n in $.edges.selSetNames do print $.edges[n] -- print all selected edges, but gets truncated to the first 20 by default print $.selectedEdges -- use printAllElements context to view all edges with printAllElements on print $.selectedEdges |