EdgeSelection Values

Value > Collections > Collection Types > EdgeSelection Values

 

   

Values and Collections - Quick Navigation

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 (its contents 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,

FOR EXAMPLE:

$foo.selectedEdges[2].index
--returns the edge index of the 2nd edge in the current selection.

Iterating over a selection yields singleton selections in the loop body:

FOR EXAMPLE:

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 an 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, a bitArray, or an EdgeSelection from the same object.

   

Methods

move <edgeselection> <point3> 

Moves the edges in the EdgeSelection.

   

select <edgeselection> 

Selects the edges in the EdgeSelection.

   

deselect <edgeselection> 

Deselects the edges in the EdgeSelection.

   

delete <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]