The selectModecommand is used to change the selection mode. Object, component, root, leaf and template modes are mutually exclusive.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
component (co) | bool | ||
Set component selection on. Component selection mode allows filtered selection based on the component selection mask. The component selection mask is the set of selection masks related to objects that indicate which components are selectable. |
|||
hierarchical (h) | bool | ||
Set hierarchical selection on. There are three types of hierarchical selection: root, leaf and template. Hierarchical mode is set if root, leaf or template mode is set. Setting to hierarchical mode will set the mode to whichever of root, leaf, or template was last on. |
|||
leaf (l) | bool | ||
Set leaf selection mode on. This mode allows the leaf level objects to be selected. It is similar to object selection mode but ignores the object selection mask. |
|||
object (o) | bool | ||
Set object selection on. Object selection mode allows filtered selection based on the object selection mask. The object selection mask is the set of selection masks related to objects that indicate which objects are selectable. The masks are controlled by the selectTypecommand. Object selection mode selects the leaf level objects. |
|||
preset (p) | bool | ||
Allow selection of anything with the mask set, independent of it being an object or a component. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
root (r) | bool | ||
|
|||
template (t) | bool | ||
|
Derived from mel command maya.cmds.selectMode
Example:
import pymel.core as pm
pm.selectMode( object=True )
pm.selectMode( q=True, component=True )
# Result: False #