An EdgeSelection represents a set of edges for a scene mesh node as a virtual array. As such, you can access an edge by index, iterate over the edges, and apply mapped functions to the edges. See also Editable_Mesh. The EdgeSelection array is dynamic, i.e., its contents will change as the edges or selected edges of the mesh node change. EdgeSelection values are mappable.
Constructors
<mesh>.selectedEdges -- the currently selected edges of the mesh object
<mesh>.Edges -- all of the edges of the mesh object, read-only
Properties
<edgeselection>.count : Integer, read-only
Returns the number of edges in the edge array.
<edgeselection>.selSetNames : Array of names, read-only
Returns an array of names of the current edge-level named selection sets for the object the EdgeSelection is associated with.
The following property is present for singleton selections (of the form $foo.edges[n]):
<edgeselection>.index : Integer, read-only
Returns the index of the selected element in the mesh, e.g.,
$foo.selectedEdges[2].index
returns the edge index of the 2nd edge in the current selection.
Note that iterating over a selection yields singleton selections in the loop body:
se = for i in $foo.selectedVerts collect i.index
se contains selected edges as array
Operators
<mesh>.selectedEdges = (<array> | <bitarray>)
Selects the specified edges.
<edgeselection>[<integer>]
Retrieves the indexed edge as a singleton EdgeSelection. Index starts at 1
<edgeselection>[(<integer_array> | <bitarray>)]
Retrieves the indexed edges as a EdgeSelection. Index starts at 1.
<edgeselection>[(<#name> | <string>)]
Retrieves the edge-level named selection set, where the name of the named selection set can be specified as a name or string value.
<edgeselection>[(<#name> | <string>)] = (<faceselection> | <integer_array> | <bitarray>)
Sets the edge-level named selection set to the specified edges. The name of the named selection set can be specified as a name or string value, and the edges can be specified as an array, bitArray, or a EdgeSelection from the same object.
Methods
Moves the edges in the EdgeSelection.
Selects the edges in the EdgeSelection.
Deselects the edges in the EdgeSelection.
Deletes the edges in the EdgeSelection.
append <edgeselection> (<edgeselection> | <integer>)
Appends the edge(s) to the EdgeSelection.
findItem <edgeselection> (<edgeselection[<integer>] | <integer>)
Returns the selection index of the matching item or 0 if not found. The item is selection index or singleton EdgeSelection.
Examples
-- 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]