pymel.core.general.toggle

toggle(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
above (a) bool ../../../_images/create.gif
 
Toggle state for all objects above listed objects.
below (b) bool ../../../_images/create.gif
 
Toggle state for all objects below listed objects.
boundary (bn) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle boundary display of listed mesh objects.
boundingBox (box) bool  
   
controlVertex (cv) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle CV display of listed curves and surfaces.
doNotWrite (dnw) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle the “this should be written to the file” state.
editPoint (ep) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle edit point display of listed curves and surfaces.
extent (et) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle display of extents of listed mesh objects.
facet (f) bool ../../../_images/create.gif ../../../_images/query.gif
 
For use with normalflag. Set the normal display style to facet display.
geometry (g) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle geometry display of listed objects.
gl (gl) bool ../../../_images/create.gif
 
Toggle state for all objects
highPrecisionNurbs (hpn) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle high precision display for NurbsFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
hull (hl) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle hull display of listed curves and surfaces.
latticePoint (lp) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle point display of listed lattices
latticeShape (ls) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle display of listed lattices
localAxis (la) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle local axis display of listed objects.
newCurve (nc) bool ../../../_images/create.gif ../../../_images/query.gif
 
Set component display state of new curve objects
newPolymesh (np) bool ../../../_images/create.gif ../../../_images/query.gif
 
Set component display state of new polymesh objects
newSurface (ns) bool ../../../_images/create.gif ../../../_images/query.gif
 
Set component display state of new surface objects
normal (nr) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle display of normals of listed surface and mesh objects.
origin (o) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle origin display of listed surfaces.
point (pt) bool ../../../_images/create.gif ../../../_images/query.gif
 
For use with normal flag. Set the normal display style to vertex display.
pointDisplay (pd) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle point display of listed surfaces.
pointFacet (pf) bool ../../../_images/create.gif ../../../_images/query.gif
 
For use with normalflag. Set the normal display style to vertex and face display.
rotatePivot (rp) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle rotate pivot display of listed objects.
scalePivot (sp) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle scale pivot display of listed objects.
selectHandle (sh) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle select handle display of listed objects.
state (st) bool ../../../_images/create.gif
 
Explicitly set the state to true or false instead of toggling the state. Can not be queried.
surfaceFace (sf) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle surface face handle display of listed surfaces.
template (te) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle template state of listed objects
uvCoords (uv) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle display uv coords of listed mesh objects.
vertex (vt) bool ../../../_images/create.gif ../../../_images/query.gif
 
Toggle vertex display of listed mesh objects.

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.

Previous topic

pymel.core.general.timeCode

Next topic

pymel.core.general.toggleAxis

Core

Core Modules

Other Modules

This Page