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

Synopsis

polyOptions([activeObjects=boolean], [allEdges=boolean], [backCullVertex=boolean], [backCulling=boolean], [colorMaterialChannel=string], [colorShadedDisplay=boolean], [displayAlphaAsGreyScale=boolean], [displayBorder=boolean], [displayCenter=boolean], [displayCreaseEdge=boolean], [displayCreaseVertex=boolean], [displayGeometry=boolean], [displayInvisibleFaces=boolean], [displayItemNumbers=[boolean, boolean, boolean, boolean]], [displayMapBorder=boolean], [displayMetadata=[boolean, boolean, boolean]], [displayNormal=boolean], [displaySubdComps=boolean], [displayTriangle=boolean], [displayUVTopology=boolean], [displayUVs=boolean], [displayVertex=boolean], [displayWarp=boolean], [facet=boolean], [fullBack=boolean], [gl=boolean], [hardBack=boolean], [hardEdge=boolean], [materialBlend=string], [newPolymesh=boolean], [point=boolean], [pointFacet=boolean], [relative=boolean], [reuseTriangles=boolean], [sizeBorder=float], [sizeNormal=float], [sizeUV=float], [sizeVertex=float], [softEdge=boolean], [vertexNormalMethod=int], [wireBackCulling=boolean])

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

polyOptions is undoable, queryable, and NOT editable.

Changes the global display polygonal attributes.

Return value

None

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

Flags

activeObjects, allEdges, backCullVertex, backCulling, colorMaterialChannel, colorShadedDisplay, displayAlphaAsGreyScale, displayBorder, displayCenter, displayCreaseEdge, displayCreaseVertex, displayGeometry, displayInvisibleFaces, displayItemNumbers, displayMapBorder, displayMetadata, displayNormal, displaySubdComps, displayTriangle, displayUVTopology, displayUVs, displayVertex, displayWarp, facet, fullBack, gl, hardBack, hardEdge, materialBlend, newPolymesh, point, pointFacet, relative, reuseTriangles, sizeBorder, sizeNormal, sizeUV, sizeVertex, softEdge, vertexNormalMethod, wireBackCulling
Long name (short name) Argument types Properties
relative(r) boolean createquery
When this flag is used with flags dealing with size, the value (size) is a multiplication factor : i.e for flags : -sizeNormal, -sizeBorder. When this flag is used with flags dealing with a boolean value, the boolean value is toggled : i.e for flags : displayVertex, displayCenter, displayTriangle, displayBorder, backCullVertex, displayWarp, displayItemNumbers.
colorMaterialChannel(cm) string createquery
If colorShadedDisplay is true, then determines which material channel to display color per vertex in. The options are:
  • "none" : disable material shading
  • "ambient" : ambient material channel
  • "ambientDiffuse" : ambient and diffuse material channel
  • "diffuse" : diffuse material channel
  • "specular" : specular material channel
  • "emission" : emission material channel
materialBlend(mb) string createquery
The options are: "overwrite" "add" "subtract" "multiply" "divide" "average" "modulate2x"
colorShadedDisplay(cs) boolean createquery
Use color per vertex display in shaded mode.
displayVertex(dv) boolean createquery
Display vertices.
displayCenter(dc) boolean createquery
Display facet centers.
displayTriangle(dt) boolean createquery
Display triangulation.
displayBorder(db) boolean createquery
Highlight border edge.
displayMapBorder(dmb) boolean createquery
Highlight map border edge.
displayCreaseEdge(dce) boolean createquery
Highlight creased edges
displayCreaseVertex(dcv) boolean createquery
Highlight creased vertices
displaySubdComps(dsc) boolean createquery
Display subdivided components when in Smooth Mesh Preview mode.
sizeBorder(sb) float createquery
Set the size of the polygonal border edges.
sizeVertex(sv) float createquery
Set the size of the polygonal vertex.
displayWarp(dw) boolean createquery
Highlight warped facets.
displayItemNumbers(din) [boolean, boolean, boolean, boolean] createquery
Displays item numbers (vertices edges facets uvs)
displayMetadata(dmt) [boolean, boolean, boolean] createquery
Displays component metadata (vertices edges facets vertexFaces)
displayNormal(dn) boolean createquery
Display normals.
displayUVs(duv) boolean createquery
Display UVs.
displayUVTopology(uvt) boolean createquery
Option on UV display to display UVs topologically.
sizeUV(suv) float createquery
Set the size of the polygonal UV.
point(pt) boolean createquery
For use with -dn flag. Set the normal display style to vertex display.
facet(f) boolean createquery
For use with -dn flag. Set the normal display style to facet display.
pointFacet(pf) boolean createquery
For use with -dn flag. Set the normal display style to vertex and face display.
sizeNormal(sn) float createquery
Set the size of the polygonal normals.
allEdges(ae) boolean createquery
Display all edges in solid line.
softEdge(se) boolean createquery
Display soft edges in dotted lines.
hardEdge(he) boolean createquery
Display only hard edges.
displayGeometry(dg) boolean createquery
Display geometry.
backCulling(bc) boolean createquery
Display with no back culling.
wireBackCulling(wbc) boolean createquery
Backculled faces are in wireframe.
hardBack(hb) boolean createquery
Backculled hard edges only for backculled faces.
fullBack(fb) boolean createquery
Display with full back culling.
backCullVertex(bcv) boolean createquery
BackCull vertices.
reuseTriangles(rt) boolean createquery
Avoid regenerating triangles, by reusing the old triangles upstream in the construction history. The construction history is searched upstream and downstream for other mesh nodes, and the given boolean value is set on those mesh nodes. Note, that this command does not set the value on the given mesh node. That has to be done using the setAttr command. This option would affect only the interactive 3d viewport. The batch-rendering would use the properly computed triangles. This is useful only for interactive performance such as skinning playback, when the display mode is shaded (or wireframe with triangles displayed) Using this option for wireframe display mode is not recomended.
gl(gl) boolean createquery
Apply user choices for all objects.
activeObjects(ao) boolean createquery
Apply user choices for all active objects.
newPolymesh(np) boolean createquery
Set component display state of new polymesh objects.
displayAlphaAsGreyScale(dal) boolean createquery
Display alpha as grey scale.
displayInvisibleFaces(dif) boolean createquery
Highlight invisible faces
vertexNormalMethod(vnm) int createquery
This setting only works with the newPolymesh flag. Sets a new default attribute value for the vertexNormalMethod attribute on a polymesh object. Options are: 0: Unweighted 1: Angle Weighted 2: Area Weighted 3: Angle And Area Weighted

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.polyCube( n='plg', sx=3, sy=3, sz=3, w=5, h=5, d=5 )
cmds.delete( 'plg.f[9:17]' )

# Vertices
cmds.polyOptions( displayVertex=True )
# Toggle vertices
cmds.polyOptions( r=True, displayVertex=True )
# Toggle, whatever the value given to the flag in this command.
# It was previously true, it is set to false : vertices are not drawn.

# Facet centers
cmds.polyOptions( displayCenter=True )
cmds.polyOptions( displayCenter=False )

# Triangulation
cmds.polyOptions( displayTriangle=True )
cmds.polyOptions( displayTriangle=False )

# Reusing Triangulation
cmds.polyOptions( reuseTriangles=True )
cmds.polyOptions( reuseTriangles=False )

# Borders
cmds.polyOptions( displayBorder=True )
# Border size
cmds.polyOptions( sb=3 )
# Increase border size
cmds.polyOptions( r=True, sb=2 )
cmds.polyOptions( displayBorder=False, sb=3 )
# Map borders
cmds.polyOptions( displayMapBorder=True )
cmds.polyOptions( displayMapBorder=False )

# Normals
# Normal type
cmds.polyOptions( displayNormal=True )
cmds.polyOptions( pt=True )# on vertices
cmds.polyOptions( pf=True )# on vertices and facets
cmds.polyOptions( f=True )# on facets
# Normal size
cmds.polyOptions( sn=2 )
# Increase normal size
cmds.polyOptions( r=True, sn=1.5 )
cmds.polyOptions( displayNormal=False )

# Edges
cmds.polyOptions( softEdge=True )
cmds.polyOptions( hardEdge=True )
cmds.polyOptions( allEdges=True )

# Geometry
cmds.polyOptions( displayGeometry=False )
cmds.polyOptions( displayGeometry=True )

# Backculling
cmds.polyOptions( wireBackCulling=True )
cmds.polyOptions( hardBack=True )
cmds.polyOptions( fullBack=True )
cmds.polyOptions( displayVertex=True, backCullVertex=True )
cmds.polyOptions( backCullVertex=False )
cmds.polyOptions( displayVertex=False )
cmds.polyOptions( backCulling=True )

# Color Shaded Display
cmds.polyOptions( colorShadedDisplay=True )
cmds.polyOptions( colorMaterialChannel='DIFFUSE' )