Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

polySelect([add=boolean], [addFirst=boolean], [asSelectString=boolean], [deselect=boolean], [edgeBorder=uint], [edgeBorderPath=[int, int]], [edgeBorderPattern=[int, int]], [edgeLoop=uint], [edgeLoopOrBorder=uint], [edgeLoopOrBorderPattern=[int, int]], [edgeLoopPath=[int, int]], [edgeLoopPattern=[int, int]], [edgeRing=uint], [edgeRingPath=[int, int]], [edgeRingPattern=[int, int]], [edgeUVLoopOrBorder=uint], [extendToShell=uint], [noSelection=boolean], [replace=boolean], [shortestEdgePath=[int, int]], [shortestEdgePathUV=[int, int]], [shortestFacePath=[int, int]], [toggle=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

polySelect is undoable, queryable, and NOT editable.

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.

Return value

int[]List of selected components.

In query mode, return type is based on queried flag.

Flags

add, addFirst, asSelectString, deselect, edgeBorder, edgeBorderPath, edgeBorderPattern, edgeLoop, edgeLoopOrBorder, edgeLoopOrBorderPattern, edgeLoopPath, edgeLoopPattern, edgeRing, edgeRingPath, edgeRingPattern, edgeUVLoopOrBorder, extendToShell, noSelection, replace, shortestEdgePath, shortestEdgePathUV, shortestFacePath, toggle
Long name (short name) Argument types Properties
add(add) boolean createquery
Indicates that the specified items should be added to the active list without removing existing items from the active list.
addFirst(af) boolean createquery
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) boolean createquery
Changes the return type from an integer array to a string array which can be used as a selection string.
deselect(d) boolean createquery
Indicates that the specified items should be removed from the active list if they are on the active list.
edgeBorder(eb) uint createquerymultiuse
Select all conected border edges starting at the given edge.

In query mode, this flag needs a value.

edgeBorderPath(ebp) [int, int] createquerymultiuse
Given two edges on the same border, this will select the edges on the border in the path between them.

In query mode, this flag needs a value.

edgeBorderPattern(bpt) [int, int] createquerymultiuse
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.

In query mode, this flag needs a value.

edgeLoop(el) uint createquerymultiuse
Select an edge loop starting at the given edge.

In query mode, this flag needs a value.

edgeLoopOrBorder(elb) uint createquerymultiuse
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.

In query mode, this flag needs a value.

edgeLoopOrBorderPattern(lbp) [int, int] createquerymultiuse
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.

In query mode, this flag needs a value.

edgeLoopPath(elp) [int, int] createquerymultiuse
Given two edges that are on the same edge loop, this will select the shortest path between them on the loop.

In query mode, this flag needs a value.

edgeLoopPattern(lpt) [int, int] createquerymultiuse
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.

In query mode, this flag needs a value.

edgeRing(er) uint createquerymultiuse
Select an edge ring starting at the given edge.

In query mode, this flag needs a value.

edgeRingPath(erp) [int, int] createquerymultiuse
Given two edges that are on the same edge ring, this will select the shortest path between them on the ring.

In query mode, this flag needs a value.

edgeRingPattern(rpt) [int, int] createquerymultiuse
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.

In query mode, this flag needs a value.

edgeUVLoopOrBorder(euv) uint createquerymultiuse
Select an edge loop or border, terminating at UV borders.

In query mode, this flag needs a value.

extendToShell(ets) uint createquerymultiuse
Select the poly shell given a face id.

In query mode, this flag needs a value.

noSelection(ns) boolean createquery
If this flag is used then the selection is not changed at all.
replace(r) boolean createquery
Indicates that the specified items should replace the existing items on the active list.
shortestEdgePath(sep) [int, int] createquerymultiuse
Given two vertices, this will select the shortest path between them in the 3d object space.

In query mode, this flag needs a value.

shortestEdgePathUV(spu) [int, int] createquerymultiuse
Given two UVs, this will select the shortest path between them in the 2d texture space.

In query mode, this flag needs a value.

shortestFacePath(sfp) [int, int] createquerymultiuse
Given two faces, this will select the shortest path between them in the 3d object space.

In query mode, this flag needs a value.

toggle(tgl) boolean createquery
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.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

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