The snapMode command is used to control snapping. It toggles the snapping modes in effect and sets information used for snapping.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
curve (c) | bool | ||
|
|||
distanceIncrement (dsi) | float | ||
|
|||
edgeMagnet (em) | int | ||
|
|||
edgeMagnetTolerance (emt) | float | ||
|
|||
grid (gr) | bool | ||
|
|||
liveFaceCenter (lfc) | bool | ||
|
|||
livePoint (lp) | bool | ||
|
|||
pixelCenter (pc) | bool | ||
|
|||
pixelSnap (ps) | bool | ||
|
|||
point (p) | bool | ||
|
|||
tolerance (t) | int | ||
Tolerance defines the size of the square region in which points must lie in order to be snapped to. The tolerance value is the distance from the cursor position to the boundary of the square (in all four directions). |
|||
useTolerance (ut) | bool | ||
If useTolerance is set, then point snapping is limited to points that are within a square region surrounding the cursor position. The size of the square is determined by the tolerance value. |
|||
uvTolerance (uvt) | int | ||
uvTolerance defines the size of the square region in which points must lie in order to be snapped to, in the UV Texture Editor. The tolerance value is the distance from the cursor position to the boundary of the square (in all four directions). |
|||
viewPlane (vp) | bool | ||
|
Derived from mel command maya.cmds.snapMode
Example:
import pymel.core as pm
# Turn curve snapping on
pm.snapMode( curve=True )
# Returns true if point snapping is on
pm.snapMode( q=True, point=True )
# Result: False #