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

Synopsis

toggle [-above] [-below] [-boundary] [-boundingBox] [-controlVertex] [-doNotWrite] [-editPoint] [-extent] [-facet] [-geometry] [-global] [-highPrecisionNurbs] [-hull] [-latticePoint] [-latticeShape] [-localAxis] [-newCurve] [-newPolymesh] [-newSurface] [-normal] [-origin] [-point] [-pointDisplay] [-pointFacet] [-rotatePivot] [-scalePivot] [-selectHandle] [-state boolean] [-surfaceFace] [-template] [-uvCoords] [-vertex] [objects]

toggle is undoable, queryable, and NOT editable.

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.

Return value

booleanwhen in the query mode. none otherwise.

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

Related

currentUnit, displayAffected, displayColor, displayCull, displayLevelOfDetail, displayPref, displayRGBColor, displaySmoothness, displayStats, displaySurface, hide, refresh, showHidden

Flags

above, below, boundary, boundingBox, controlVertex, doNotWrite, editPoint, extent, facet, geometry, global, highPrecisionNurbs, hull, latticePoint, latticeShape, localAxis, newCurve, newPolymesh, newSurface, normal, origin, point, pointDisplay, pointFacet, rotatePivot, scalePivot, selectHandle, state, surfaceFace, template, uvCoords, vertex
Long name (short name) Argument types Properties
-above(-a) create
Toggle state for all objects above listed objects.
-below(-b) create
Toggle state for all objects below listed objects.
-boundary(-bn) createquery
Toggle boundary display of listed mesh objects.
-boundingBox(-box) createquery
Toggle or query the bounding box display of listed objects.
-controlVertex(-cv) createquery
Toggle CV display of listed curves and surfaces.
-doNotWrite(-dnw) createquery
Toggle the "this should be written to the file" state.
-editPoint(-ep) createquery
Toggle edit point display of listed curves and surfaces.
-extent(-et) createquery
Toggle display of extents of listed mesh objects.
-facet(-f) createquery
For use with normal flag. Set the normal display style to facet display.
-geometry(-g) createquery
Toggle geometry display of listed objects.
-global(-gl) create
Toggle state for all objects
-highPrecisionNurbs(-hpn) createquery
Toggle high precision display for Nurbs
-hull(-hl) createquery
Toggle hull display of listed curves and surfaces.
-latticePoint(-lp) createquery
Toggle point display of listed lattices
-latticeShape(-ls) createquery
Toggle display of listed lattices
-localAxis(-la) createquery
Toggle local axis display of listed objects.
-newCurve(-nc) createquery
Set component display state of new curve objects
-newPolymesh(-np) createquery
Set component display state of new polymesh objects
-newSurface(-ns) createquery
Set component display state of new surface objects
-normal(-nr) createquery
Toggle display of normals of listed surface and mesh objects.
-origin(-o) createquery
Toggle origin display of listed surfaces.
-point(-pt) createquery
For use with normal flag. Set the normal display style to vertex display.
-pointDisplay(-pd) createquery
Toggle point display of listed surfaces.
-pointFacet(-pf) createquery
For use with normal flag. Set the normal display style to vertex and face display.
-rotatePivot(-rp) createquery
Toggle rotate pivot display of listed objects.
-scalePivot(-sp) createquery
Toggle scale pivot display of listed objects.
-selectHandle(-sh) createquery
Toggle select handle display of listed objects.
-state(-st) boolean create
Explicitly set the state to true or false instead of toggling the state. Can not be queried.
-surfaceFace(-sf) createquery
Toggle surface face handle display of listed surfaces.
-template(-te) createquery
Toggle template state of listed objects
-uvCoords(-uv) createquery
Toggle display uv coords of listed mesh objects.
-vertex(-vt) createquery
Toggle vertex display of listed mesh objects.

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 be used more than once in a command.

MEL examples

$surface1 = `sphere`;
toggle -cv $surface1;
toggle -g -cv;
toggle -q -cv;
    // Returns 0 if the queried state is false.
    // Returns 1 if the queried state is true.