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

Synopsis

polySmooth([constructionHistory=boolean], [continuity=float], [divisions=int], [keepBorder=boolean], [keepHardEdge=boolean], [keepSelectionBorder=boolean], [keepTessellation=boolean], [name=string])

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

polySmooth is undoable, queryable, and editable.

Smooth a polygonal object. This command works on polygonal objects or faces.

Flags

constructionHistory, continuity, divisions, keepBorder, keepHardEdge, keepSelectionBorder, keepTessellation, name
Long name (short name) [argument types] Properties
continuity(c) float createqueryedit
This flag specifies the smoothness parameter. The minimum value of 0.0 specifies that the faces should only be subdivided. Maximum value of 1.0 smooths the faces as much as possible.
C: Default is 1.0
Q: When queried, this flag returns a float.

In query mode, this flag needs a value.

divisions(dv) int createqueryedit
This flag specifies the number of recursive smoothing steps.
C: Default is 1.
Q: When queried, this flag returns an int.

In query mode, this flag needs a value.

keepBorder(kb) boolean createqueryedit
If on, the border of the object will not move during smoothing operation.
C: Default is "on".
Q: When queried, this flag returns an int.

In query mode, this flag needs a value.

keepSelectionBorder(ksb) boolean createqueryedit
If true, vertices on border of the selection will not be modified.
C: Default is false.
Q: When queried, this flag returns a boolean.

In query mode, this flag needs a value.

keepHardEdge(khe) boolean createqueryedit
If true, vertices on hard edges will not be modified.
C: Default is false.
Q: When queried, this flag returns a boolean.

In query mode, this flag needs a value.

keepTessellation(kt) boolean createqueryedit
If true, the object will be tessellated consistently at each frame. If false, non-starlike faces will be triangulated before being subdivided, to avoid self-overlapping faces.
C: Default is true.
Q: When queried, this flag returns a boolean.

Common flags

In query mode, this flag needs a value.

name(n) string create
Name the resulting object.
constructionHistory(ch) boolean createquery
Turn the construction history on or off (where applicable).
Q: When queried, this flag returns an int.

In query mode, this flag needs a value.


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.

Return value


string The node name.

Related

polyAppend, polyAppendVertex, polyBevel, polyChipOff, polyCreateFacet, polyExtrudeEdge, polyExtrudeFacet, polySplit, polySplitVertex, polySubdivideEdge, polySubdivideFacet, polyTriangulate

Python examples

import maya.cmds as cmds

cmds.polyCube( n='plg1' )
cmds.move( -3, 0, 2 )
cmds.polyCube( n='plg2' )
cmds.move( -3, 0, -2 )
cmds.polyCube( n='plg3' )
cmds.move( 0, 0, 2 )
cmds.delete( 'plg3.f[1]' )
cmds.polyCube( n='plg4' )
cmds.move( 0, 0, -2 )
cmds.delete( 'plg4.f[1]' )
cmds.polyCube( n='plg5' )
cmds.move( 3, 0, 2 )
cmds.polyCube( n='plg6' )
cmds.move( 3, 0, -2 )

cmds.polyOptions( ao=True, db=1 )

# only one division:
cmds.polySmooth( 'plg1.f[0:5]', dv=1 )

# 2 divisions produces a round-ish object
cmds.polySmooth( 'plg2.f[0:5]', dv=2 )

# keep border edges
cmds.select( 'plg3.f[0:4]' )
cmds.polySmooth( kb=1 )

# don't keep border edges
cmds.select( 'plg4.f[0:4]' )
cmds.polySmooth( kb=0 )

# 1 division, continuity 0.2
cmds.select( 'plg5' )
cmds.polySmooth( c=0.2 )

# 1 division, continuity 0.8
cmds.polySmooth( 'plg6.f[0:5]', c=0.8 )