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 Indicates that the specified items should be added to the active list without removing existing items from the active list. addFirst / af bool 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 Changes the return type from an integer array to a string array which can be used as a selection string. deselect / d bool Indicates that the specified items should be removed from the active list if they are on the active list. edgeBorder / eb int Select all conected border edges starting at the given edge. edgeBorderPath / ebp int, int Given two edges on the same border, this will select the edges on the border in the path between them. edgeBorderPattern / bpt int, int 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 Select an edge loop starting at the given edge. edgeLoopOrBorder / elb int 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 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 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 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 Select an edge ring starting at the given edge. edgeRingPath / erp int, int 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 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 Select an edge loop or border, terminating at UV borders. everyN / en int extendToShell / ets int Select the poly shell given a face id. noSelection / ns bool If this flag is used then the selection is not changed at all. replace / r bool Indicates that the specified items should replace the existing items on the active list. shortestEdgePath / sep int, int Given two vertices, this will select the shortest path between them in the 3d object space. shortestEdgePathUV / spu int, int Given two UVs, this will select the shortest path between them in the 2d texture space. shortestFacePath / sfp int, int Given two faces, this will select the shortest path between them in the 3d object space. toggle / tgl bool 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 have multiple arguments, passed either as a tuple or a 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) )