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

Synopsis

displaySurface( [objects...] , [flipNormals=boolean], [twoSidedLighting=boolean], [xRay=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

displaySurface is undoable, queryable, and NOT editable.

This command toggles display options on the specified or active surfaces. Typically this command applies to NURBS or poly mesh surfaces and ignores other type of objects.

Return value

booleanwhen in the query mode.

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

Related

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

Flags

flipNormals, twoSidedLighting, xRay
Long name (short name) Argument types Properties
flipNormals(flp) boolean query
flip normal direction on the surface
twoSidedLighting(two) boolean query
toggle if the surface should be considered two-sided. If it's single-sided, drawing and rendering may use single sided lighting and back face cull to improve performance.
xRay(x) boolean query
toggle X ray mode (make surface transparent)

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 have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

cmds.sphere(n='mySphere1')
cmds.sphere(n='mySphere2')
cmds.displaySurface( ['mySphere1', 'mySphere2'], two=False )
cmds.displaySurface( xRay=True )