This command is responsible for setting the display smoothness of NURBS curves and surfaces to either predefined or custom values. It also sets display modes for smoothness such as hulls and the hull simplification factors. At present, this command is NOT un-doable. In query mode, return type is based on queried flag.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
all (all) | bool | ||
|
|||
boundary (bn) | bool | ||
|
|||
defaultCreation (dc) | bool | ||
|
|||
divisionsU (du) | int | ||
|
|||
divisionsV (dv) | int | ||
|
|||
full (f) | bool | ||
|
|||
hull (hl) | bool | ||
Display surface using the hull (control points are drawn rather than surface knot points). This mode is a useful display performance improvement when modifying a surface since it doesn’t require evaluating points on the surface. |
|||
pointsShaded (ps) | int | ||
|
|||
pointsWire (pw) | int | ||
Number of points per surface isoparm span or the number of points per curve span in wireframe mode. The valid range of values is [1,128]. Note: This is the only flag that also applies to nurbs curves. |
|||
polygonObject (po) | int | ||
Display the polygon objects with the given resolutionFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
renderTessellation (rt) | bool | ||
|
|||
simplifyU (su) | int | ||
|
|||
simplifyV (sv) | int | ||
|
Derived from mel command maya.cmds.displaySmoothness
Example:
import pymel.core as pm
# create a surface
pm.sphere()
# set rough smoothness settings
pm.displaySmoothness( du=0, dv=0, pw=4, ps=1 )
# set medium smoothness settings
pm.displaySmoothness( du=1, dv=1, pw=8, ps=2 )
# set fine smoothness settings
pm.displaySmoothness( du=2, dv=2, pw=16, ps=4 )
# Display surface as a hull
pm.displaySmoothness( hull=True )
# Display with reduced number of points
pm.displaySmoothness( hull=True, su=2, sv=2 )
# Display rendering tesselation
pm.displaySmoothness( rt=1 )
# Set default value for pointsShaded.
# Subsequent surfaces created will have pointsShaded as 2.
pm.displaySmoothness( dc=True, ps=2 )
# displaySmoothness queries
#
# query hull display, returns boolean
pm.displaySmoothness( q=True, hull=True )
# query default pointsShaded value
pm.displaySmoothness( q=True, dc=True, ps=True )
# query surface divisionsU value
pm.displaySmoothness( q=True, du=True )
# Only the -pointsWire flag works on curves.
pm.circle()
# change the number of points displayed per curve span.
pm.displaySmoothness( pw=3 )
# query default pointsWire value for curves.
pm.displaySmoothness( q=True, dc=True, pw=True )
pm.polyCube()
# Query the display resolution
pm.displaySmoothness( q=True, polygonObject=True )
# Result: 0
# Change the display resolution
pm.displaySmoothness( polygonObject=2 )