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

Synopsis

selectPref([affectsActive=boolean], [allowHiliteSelection=boolean], [autoSelectContainer=boolean], [autoSelectOutlinerSetMembers=boolean], [autoUseDepth=boolean], [clickBoxSize=uint], [clickDrag=boolean], [containerCentricSelection=boolean], [disableComponentPopups=boolean], [expandPopupList=boolean], [ignoreSelectionPriority=boolean], [manipClickBoxSize=uint], [paintSelect=boolean], [paintSelectWithDepth=boolean], [popupMenuSelection=boolean], [preSelectBackfacing=boolean], [preSelectClosest=boolean], [preSelectDeadSpace=uint], [preSelectHilite=boolean], [preSelectHiliteSize=float], [preSelectTweakDeadSpace=uint], [selectTypeChangeAffectsActive=boolean], [selectionChildHighlightMode=int], [singleBoxSelection=boolean], [straightLineDistance=boolean], [trackSelectionOrder=boolean], [useDepth=boolean], [xformNoSelect=boolean])

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

selectPref is undoable, queryable, and NOT editable.

This command controls state variables used to selection UI behavior.

Return value

booleanin the query mode.

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

Related

select, selectKey, selectMode, selectPriority, selectType, selectedNodes

Flags

affectsActive, allowHiliteSelection, autoSelectContainer, autoSelectOutlinerSetMembers, autoUseDepth, clickBoxSize, clickDrag, containerCentricSelection, disableComponentPopups, expandPopupList, ignoreSelectionPriority, manipClickBoxSize, paintSelect, paintSelectWithDepth, popupMenuSelection, preSelectBackfacing, preSelectClosest, preSelectDeadSpace, preSelectHilite, preSelectHiliteSize, preSelectTweakDeadSpace, selectTypeChangeAffectsActive, selectionChildHighlightMode, singleBoxSelection, straightLineDistance, trackSelectionOrder, useDepth, xformNoSelect
Long name (short name) Argument types Properties
affectsActive(aa) boolean createquery
Set affects-active toggle which when on causes the active list to be affected when changing between object and component selection mode.
allowHiliteSelection(ahs) boolean createquery
When in component selection mode, allow selection of objects for editing. If an object is selected for editing, it appears in the hilite color and its selectable components are automatically displayed.
autoSelectContainer(asc) boolean query
When enabled, with container centric selection also on, whenever the root transform is selected in the viewport, the container node will automatically be selected as well.
autoSelectOutlinerSetMembers(asm) boolean query
When enabled selecting a set in the Outliner will automatically select the set members instead.
autoUseDepth(aud) boolean query
When enabled, useDepth and paintSelectWithDepth will be automatically enabled in shaded display mode and disabled in wireframe display mode.
clickBoxSize(cbs) uint createquery
When click selecting, this value defines the size of square picking region surrounding the cursor. The size of the square is twice the specified value. That is, the value defines the amount of space on all four sides of the cursor position. The size must be positive.
clickDrag(cld) boolean createquery
Set click/drag selection interaction on/off
containerCentricSelection(ccs) boolean query
When enabled, selecting any DAG node in a container in the viewport will select the container's root transform if there is one. If there is no root transform then the highest DAG node in the container will be selected. There is no effect when selecting nodes which are not in a container.
disableComponentPopups(dcp) boolean createquery
A separate preference to allow users to disable popup menus when selecting components. This pref is only meaningful if the popupMenuSelection pref is enabled.
expandPopupList(epl) boolean createquery
When in popup selection mode, if this is set then all selection items that contain multiple objects or components will be be expanded such that each object or component will be a single new selection item.
ignoreSelectionPriority(isp) boolean createquery
If this is set, selection priority will be ignored when performing selection.
manipClickBoxSize(mcb) uint createquery
When selecting a manipulator, this value defines the size of square picking region surrounding the cursor. The size of the square is twice the specified value. That is, the value defines the amount of space on all four sides of the cursor position. The size must be positive.
paintSelect(ps) boolean query
When enabled, the select tool will use drag selection instead of marquee selection.
paintSelectWithDepth(psd) boolean query
When enabled, paint selection will not select components that are behind the surface in the current camera view.
popupMenuSelection(pms) boolean createquery
If this is set, a popup menu will be displayed and used to determine the object to select. The menu lists the current user box (marquee) of selected candidate objects.
preSelectBackfacing(psb) boolean query
When enabled preselection will highlight backfacing components whose normals face away from the camera.
preSelectClosest(psc) boolean query
When enabled and the cursor is over a surface, preselection highlighting will try to preselect the closest component to the cursor regardless of distance.
preSelectDeadSpace(pds) uint query
This value defines the size of the region around the cursor used for preselection highlighting when the cursor is outside the surface.
preSelectHilite(psh) boolean query
When enabled, the closest component under the cursor will be highlighted to indicate that clicking will select that component.
preSelectHiliteSize(phs) float query
This value defines the size of the region around the cursor used for preselection highlighting. Within this region the closest component to the cursor will be highlighted.
preSelectTweakDeadSpace(pdt) uint query
This value defines the size of the region around the cursor used for preselection highlighting when the cursor is outside the surface in tweak mode.
selectTypeChangeAffectsActive(stc) boolean query
If true then the active list will be updated according to the new selection preferences.
selectionChildHighlightMode(sch) int createquery
Controls the highlighting of the children of a selected object. Valid modes are: 0: Always highlight children 1: Never highlight children 2: Use per-object "Selection Child Highlight" setting. Default mode is (0): Always highlight children. For (2), each DAG object has an individual "Selection Child Highlight" boolean flag. By default, this flag will be TRUE. When mode (2) is enabled, the control is deferred to the selected object's "Selection Child Highlight" flag.
singleBoxSelection(sbs) boolean createquery
Set single box selection on/off. This flag indicates whether just single object will be selected when the user box (marquee) selects several objects if flag set to true. Otherwise, all those objects inside the box will be selected.
straightLineDistance(sld) boolean query
If true then use straight line distances for selection proximity.
trackSelectionOrder(tso) boolean query
When enabled, the order of selected objects and components will be tracked. The 'ls' command will be able to return the active list in the order of selection which will allow scripts to be written that depend on the order.
useDepth(ud) boolean query
When enabled, marquee selection will not select components that are behind the surface in the current camera view.
xformNoSelect(xns) boolean createquery
Disable selection in xform tools

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.selectPref(popupMenuSelection=True,disableComponentPopups=True)