Go to: Synopsis. Flags. Return value. Related. Python examples.
polySoftEdge([angle=angle], [constructionHistory=boolean], [name=string], [worldSpace=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
polySoftEdge is undoable, queryable, and editable.
Selectively makes edges soft or hard.
An edge will be made hard if the angle between two owning
faces is sharper (larger) than the smoothing angle.
An edge wil be made soft if the angle between two owning
facets is flatter (smaller) than the smoothing angle.
angle, constructionHistory, name, worldSpace
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.
|
string The name of the polySoftEdge node.
polyAverageNormal, polyNormal, polyNormalPerVertex, polySetToFaceNormal
import maya.cmds as cmds
# Turn smooth shading on
# Soft and hard edges are much easier to see with smooth shading on
currentPanel = cmds.getPanel(withFocus= True)
if currentPanel != '':
cmds.modelEditor(currentPanel, edit=True, da='smoothShaded', dl='default')
cmds.polySphere(n= 'plg', sx= 15, sy= 10 )
# hard bottom
cmds.select( 'plgShape.e[0:59]', 'plgShape.e[135:194]', 'plgShape.e[255:269]', r=True )
cmds.polySoftEdge( a=0 )
# smooth top
cmds.select( 'plg.e[75:134]', 'plg.e[195:254]', 'plg.e[270:284]', r=True )
cmds.polySoftEdge( a=180 )
cmds.select( 'plg' )
cmds.polyOptions( ao=True, se=True )
# Set display mode back to wireframe (default mode)
currentPanel = cmds.getPanel(withFocus= True)
if currentPanel != '':
cmds.modelEditor(currentPanel, edit=True, da='wireframe')
Return to Autodesk Index