The toggle command is used to toggle the display of various object features for objects which have these components. For example, CV and edit point display may be toggled for those listed NURB curves or surfaces. Note: This command is not undoable.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
above (a) | bool | ||
|
|||
below (b) | bool | ||
|
|||
boundary (bn) | bool | ||
|
|||
boundingBox (box) | bool | ||
controlVertex (cv) | bool | ||
|
|||
doNotWrite (dnw) | bool | ||
|
|||
editPoint (ep) | bool | ||
|
|||
extent (et) | bool | ||
|
|||
facet (f) | bool | ||
|
|||
geometry (g) | bool | ||
|
|||
gl (gl) | bool | ||
|
|||
highPrecisionNurbs (hpn) | bool | ||
|
|||
hull (hl) | bool | ||
|
|||
latticePoint (lp) | bool | ||
|
|||
latticeShape (ls) | bool | ||
|
|||
localAxis (la) | bool | ||
|
|||
newCurve (nc) | bool | ||
|
|||
newPolymesh (np) | bool | ||
|
|||
newSurface (ns) | bool | ||
|
|||
normal (nr) | bool | ||
|
|||
origin (o) | bool | ||
|
|||
point (pt) | bool | ||
|
|||
pointDisplay (pd) | bool | ||
|
|||
pointFacet (pf) | bool | ||
|
|||
rotatePivot (rp) | bool | ||
|
|||
scalePivot (sp) | bool | ||
|
|||
selectHandle (sh) | bool | ||
|
|||
state (st) | bool | ||
|
|||
surfaceFace (sf) | bool | ||
|
|||
template (te) | bool | ||
|
|||
uvCoords (uv) | bool | ||
|
|||
vertex (vt) | bool | ||
|
Derived from mel command maya.cmds.toggle
Example:
import pymel.core as pm
import maya.cmds as cmds
surface1 = pm.sphere()
pm.toggle( surface1, cv=True )
pm.toggle( g=True, cv=True )
pm.toggle( q=True, cv=True )
# Result: False #
# Returns 0 if the queried state is false.
# Returns 1 if the queried state is true.