pymel.core.modeling.polyOptions

polyOptions(*args, **kwargs)

Changes the global display polygonal attributes. In query mode, return type is based on queried flag.

Flags:
Long name (short name) Argument Types Properties
activeObjects (ao) bool ../../../_images/create.gif ../../../_images/query.gif
 
Apply user choices for all active objects.
allEdges (ae) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display all edges in solid line.
backCullVertex (bcv) bool ../../../_images/create.gif ../../../_images/query.gif
 
BackCull vertices.
backCulling (bc) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display with no back culling.
colorMaterialChannel (cm) unicode ../../../_images/create.gif ../../../_images/query.gif
 

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 ../../../_images/create.gif ../../../_images/query.gif
 
Use color per vertex display in shaded mode.
| .. |
dal)** | bool | .. image:: /images/create.gif |
| | .. image:: /images/query.gif |
 
Display alpha as grey scale.
displayBorder (db) bool ../../../_images/create.gif ../../../_images/query.gif
 
Highlight border edge.
displayCenter (dc) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display facet centers.
displayCreaseEdge (dce) bool ../../../_images/create.gif ../../../_images/query.gif
 
Highlight creased edges
displayCreaseVertex (dcv) bool ../../../_images/create.gif ../../../_images/query.gif
 
Highlight creased vertices
displayGeometry (dg) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display geometry.
displayInvisibleFaces (dif) bool ../../../_images/create.gif ../../../_images/query.gif
 
Highlight invisible facesFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
displayItemNumbers (din) bool, bool, bool, bool ../../../_images/create.gif ../../../_images/query.gif
 
Displays item numbers (vertices edges facets uvs)
displayMapBorder (dmb) bool ../../../_images/create.gif ../../../_images/query.gif
 
Highlight map border edge.
displayNormal (dn) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display normals.
displaySubdComps (dsc) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display subdivided components when in Smooth Mesh Preview mode.
displayTangent (dtn) bool  
   
displayTriangle (dt) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display triangulation.
displayUVTopology (uvt) bool ../../../_images/create.gif ../../../_images/query.gif
 
Option on UV display to display UVs topologically.
displayUVs (duv) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display UVs.
displayVertex (dv) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display vertices.
displayWarp (dw) bool ../../../_images/create.gif ../../../_images/query.gif
 
Highlight warped facets.
facet (f) bool ../../../_images/create.gif ../../../_images/query.gif
 
For use with -dn flag. Set the normal display style to facet display.
fullBack (fb) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display with full back culling.
gl (gl) bool ../../../_images/create.gif ../../../_images/query.gif
 
Apply user choices for all objects.
hardBack (hb) bool ../../../_images/create.gif ../../../_images/query.gif
 
Backculled hard edges only for backculled faces.
hardEdge (he) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display only hard edges.
materialBlend (mb) unicode ../../../_images/create.gif ../../../_images/query.gif
 
The options are: “overwrite” “add” “subtract” “multiply” “divide” “average” “modulate2x”
newPolymesh (np) bool ../../../_images/create.gif ../../../_images/query.gif
 
Set component display state of new polymesh objects.
point (pt) bool ../../../_images/create.gif ../../../_images/query.gif
 
For use with -dn flag. Set the normal display style to vertex display.
pointFacet (pf) bool ../../../_images/create.gif ../../../_images/query.gif
 
For use with -dn flag. Set the normal display style to vertex and face display.
relative (r) bool ../../../_images/create.gif ../../../_images/query.gif
 

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 ../../../_images/create.gif ../../../_images/query.gif
 

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 ../../../_images/create.gif ../../../_images/query.gif
 
Set the size of the polygonal border edges.
sizeNormal (sn) float ../../../_images/create.gif ../../../_images/query.gif
 
Set the size of the polygonal normals.
sizeUV (suv) float ../../../_images/create.gif ../../../_images/query.gif
 
Set the size of the polygonal UV.
sizeVertex (sv) float ../../../_images/create.gif ../../../_images/query.gif
 
Set the size of the polygonal vertex.
softEdge (se) bool ../../../_images/create.gif ../../../_images/query.gif
 
Display soft edges in dotted lines.
wireBackCulling (wbc) bool ../../../_images/create.gif ../../../_images/query.gif
 
Backculled faces are in wireframe.

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' )

Previous topic

pymel.core.modeling.polyOptUvs

Next topic

pymel.core.modeling.polyOutput

Core

Core Modules

Other Modules

This Page