pymel.core.modeling.polySelect

polySelect(*args, **kwargs)

This command makes different types of poly component selections. The return value is an integer array containing the id’s of the components in the selection in order. If a given type of selection loops back on itself then this is indicated by the start id appearing twice, once at the start and once at the end.

Flags:
Long name (short name) Argument Types Properties
add (add) bool ../../../_images/create.gif ../../../_images/query.gif
 
Indicates that the specified items should be added to the active list without removing existing items from the active list.
addFirst (af) bool ../../../_images/create.gif ../../../_images/query.gif
 
Indicates that the specified items should be added to the front of the active list without removing existing items from the active list.
asSelectString (ass) bool ../../../_images/create.gif ../../../_images/query.gif
 

Changes the return type from an integer array to a string array which can be used as a selection string.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

deselect (d) bool ../../../_images/create.gif ../../../_images/query.gif
 
Indicates that the specified items should be removed from the active list if they are on the active list.
edgeBorder (eb) int ../../../_images/create.gif ../../../_images/query.gif
 
Select all conected border edges starting at the given edge.
edgeBorderPath (ebp) int, int ../../../_images/create.gif ../../../_images/query.gif
 
Given two edges on the same border, this will select the edges on the border in the path between them.
edgeBorderPattern (bpt) int, int ../../../_images/create.gif ../../../_images/query.gif
 

Given two edges on the same border, this will check how many edges there are between the given edges and then continue that pattern of selection around the border.

edgeLoop (el) int ../../../_images/create.gif ../../../_images/query.gif
 
Select an edge loop starting at the given edge.
edgeLoopOrBorder (elb) int ../../../_images/create.gif ../../../_images/query.gif
 
Select an edge loop or all conected border edges, depending on whether the edge is on a border or not, starting at the given edge.
edgeLoopOrBorderPattern (lbp) int, int ../../../_images/create.gif ../../../_images/query.gif
 

Given two edges either on the same edge loop or on the same edge border, this will check how many edges there are between the given edges and then continue that pattern of selection around the edge loop or edge border.

edgeLoopPath (elp) int, int ../../../_images/create.gif ../../../_images/query.gif
 
Given two edges that are on the same edge loop, this will select the shortest path between them on the loop.
edgeLoopPattern (lpt) int, int ../../../_images/create.gif ../../../_images/query.gif
 

Given two edges on the same edge loop, this will check how many edges there are between the given edges and then continue that pattern of selection around the edge loop.

edgeRing (er) int ../../../_images/create.gif ../../../_images/query.gif
 
Select an edge ring starting at the given edge.
edgeRingPath (erp) int, int ../../../_images/create.gif ../../../_images/query.gif
 
Given two edges that are on the same edge ring, this will select the shortest path between them on the ring.
edgeRingPattern (rpt) int, int ../../../_images/create.gif ../../../_images/query.gif
 

Given two edges on the same edge ring, this will check how many edges there are between the given edges and then continue that pattern of selection around the edge ring.

edgeUVLoopOrBorder (euv) int ../../../_images/create.gif ../../../_images/query.gif
 
Select an edge loop or border, terminating at UV borders.
everyN (en) int  
   
extendToShell (ets) int ../../../_images/create.gif ../../../_images/query.gif
 
Select the poly shell given a face id.
noSelection (ns) bool ../../../_images/create.gif ../../../_images/query.gif
 
If this flag is used then the selection is not changed at all.
replace (r) bool ../../../_images/create.gif ../../../_images/query.gif
 
Indicates that the specified items should replace the existing items on the active list.
shortestEdgePath (sep) int, int ../../../_images/create.gif ../../../_images/query.gif
 
Given two vertices, this will select the shortest path between them in the 3d object space.
shortestEdgePathUV (spu) int, int ../../../_images/create.gif ../../../_images/query.gif
 
Given two UVs, this will select the shortest path between them in the 2d texture space.
shortestFacePath (sfp) int, int ../../../_images/create.gif ../../../_images/query.gif
 
Given two faces, this will select the shortest path between them in the 3d object space.
toggle (tgl) bool ../../../_images/create.gif ../../../_images/query.gif
 

Indicates that those items on the given list which are on the active list should be removed from the active list and those items on the given list which are not on the active list should be added to the active list.

Derived from mel command maya.cmds.polySelect

Example:

import pymel.core as pm

pm.polySelect( 'pCube1', edgeRing=1 )
pm.polySelect( 'pCube1', toggle=True, edgeRingPath=(1, 10) )
pm.polySelect( 'pCube1', ns=True, edgeRingPath=(1, 10) )
pm.polySelect( 'pCube1', edgeRingPath=((1, 10), (11, 20)) )
pm.polySelect( 'pPlane1', shortestEdgePath=(10, 100) )

Previous topic

pymel.core.modeling.polyReduce

Next topic

pymel.core.modeling.polySelectConstraint

Core

Core Modules

Other Modules

This Page