Changes the global display polygonal attributes. In query mode, return type is based on queried flag.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
activeObjects (ao) | bool | ||
|
|||
allEdges (ae) | bool | ||
|
|||
backCullVertex (bcv) | bool | ||
|
|||
backCulling (bc) | bool | ||
|
|||
colorMaterialChannel (cm) | unicode | ||
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 |
|||
colorShadedDisplay (cs) | bool | ||
|
|
|||
displayBorder (db) | bool | ||
|
|||
displayCenter (dc) | bool | ||
|
|||
displayCreaseEdge (dce) | bool | ||
|
|||
displayCreaseVertex (dcv) | bool | ||
|
|||
displayGeometry (dg) | bool | ||
|
|||
displayInvisibleFaces (dif) | bool | ||
|
|||
displayItemNumbers (din) | bool, bool, bool, bool | ||
|
|||
displayMapBorder (dmb) | bool | ||
|
|||
displayNormal (dn) | bool | ||
|
|||
displaySubdComps (dsc) | bool | ||
|
|||
displayTangent (dtn) | bool | ||
displayTriangle (dt) | bool | ||
|
|||
displayUVTopology (uvt) | bool | ||
|
|||
displayUVs (duv) | bool | ||
|
|||
displayVertex (dv) | bool | ||
|
|||
displayWarp (dw) | bool | ||
|
|||
facet (f) | bool | ||
|
|||
fullBack (fb) | bool | ||
|
|||
gl (gl) | bool | ||
|
|||
hardBack (hb) | bool | ||
|
|||
hardEdge (he) | bool | ||
|
|||
materialBlend (mb) | unicode | ||
|
|||
newPolymesh (np) | bool | ||
|
|||
point (pt) | bool | ||
|
|||
pointFacet (pf) | bool | ||
|
|||
relative (r) | bool | ||
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. |
|||
reuseTriangles (rt) | bool | ||
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. |
|||
sizeBorder (sb) | float | ||
|
|||
sizeNormal (sn) | float | ||
|
|||
sizeUV (suv) | float | ||
|
|||
sizeVertex (sv) | float | ||
|
|||
softEdge (se) | bool | ||
|
|||
wireBackCulling (wbc) | bool | ||
|
Derived from mel command maya.cmds.polyOptions
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.polyCube( n='plg', sx=3, sy=3, sz=3, w=5, h=5, d=5 )
pm.delete( 'plg.f[9:17]' )
# Vertices
pm.polyOptions( displayVertex=True )
# Toggle vertices
pm.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
pm.polyOptions( displayCenter=True )
pm.polyOptions( displayCenter=False )
# Triangulation
pm.polyOptions( displayTriangle=True )
pm.polyOptions( displayTriangle=False )
# Reusing Triangulation
pm.polyOptions( reuseTriangles=True )
pm.polyOptions( reuseTriangles=False )
# Borders
pm.polyOptions( displayBorder=True )
# Border size
pm.polyOptions( sb=3 )
# Increase border size
pm.polyOptions( r=True, sb=2 )
pm.polyOptions( displayBorder=False, sb=3 )
# Map borders
pm.polyOptions( displayMapBorder=True )
pm.polyOptions( displayMapBorder=False )
# Normals
# Normal type
pm.polyOptions( displayNormal=True )
pm.polyOptions( pt=True )# on vertices
pm.polyOptions( pf=True )# on vertices and facets
pm.polyOptions( f=True )# on facets
# Normal size
pm.polyOptions( sn=2 )
# Increase normal size
pm.polyOptions( r=True, sn=1.5 )
pm.polyOptions( displayNormal=False )
# Edges
pm.polyOptions( softEdge=True )
pm.polyOptions( hardEdge=True )
pm.polyOptions( allEdges=True )
# Geometry
pm.polyOptions( displayGeometry=False )
pm.polyOptions( displayGeometry=True )
# Backculling
pm.polyOptions( wireBackCulling=True )
pm.polyOptions( hardBack=True )
pm.polyOptions( fullBack=True )
pm.polyOptions( displayVertex=True, backCullVertex=True )
pm.polyOptions( backCullVertex=False )
pm.polyOptions( displayVertex=False )
pm.polyOptions( backCulling=True )
# Color Shaded Display
pm.polyOptions( colorShadedDisplay=True )
pm.polyOptions( colorMaterialChannel='DIFFUSE' )