pymel.core.general.selectMode

selectMode(*args, **kwargs)

The selectModecommand is used to change the selection mode. Object, component, root, leaf and template modes are mutually exclusive.

Flags:
  • component : co (bool) [create,query]

    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) [create,query]

    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) [create,query]

    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) [create,query]

    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) [create,query]

    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) [create,query]

    Set root selection mode on. This mode allows the root of a hierarchy to be selected by selecting any of its descendents. It ignores the object selection mask.

  • template : t (bool) [create,query]

    Set template selection mode on. This mode allows selection of templated objects. It selects the templated object closest to the root of the hierarchy.

Derived from mel command maya.cmds.selectMode

Previous topic

pymel.core.general.selectKey

Next topic

pymel.core.general.selectPref

Core

Core Modules

Other Modules

This Page