Your Ad Here

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

Synopsis

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.

Flags

angle, constructionHistory, name, worldSpace
Long name (short name) [argument types] Properties
angle(a) angle createqueryedit
Smoothing angle.
C: Default is 30 degrees.
Q: When queried, this flag returns a float.

In query mode, this flag needs a value.

worldSpace(ws) boolean createqueryedit
This flag specifies which reference to use. If "on" : all geometrical values are taken in world reference. If "off" : all geometrical values are taken in object reference.
C: Default is "off".
Q: When queried, this flag returns an int.

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 name of the polySoftEdge node.

Related

polyAverageNormal, polyNormal, polyNormalPerVertex, polySetToFaceNormal

Python examples

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


Your Ad Here