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

Synopsis

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

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.