This command returns the arclength of a curve if the history flag is not set (the default). If the history flag is set, a node is created that can produce the arclength, and is connected and its name returned. Having the construction history option on makes this command useful for expressions.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
caching (cch) | bool | ||
constructionHistory (ch) | bool | ||
Turn the construction history on or off (where applicable)Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
name (n) | unicode | ||
nodeState (nds) | int | ||
Derived from mel command maya.cmds.arclen
Example:
import pymel.core as pm
import maya.cmds as cmds
pm.arclen( 'curve1' )
# This command returns a float value that is the length of curve1 in
# the current linear units.
curveInfoNode = pm.arclen('curve1', ch=True)
pm.expression( s= 'surface1.sx = %s.arcLength' % curveInfoNode )
# The first command produces a curve info node for curve1 and returns
# the name of the curve info node. The second command shows how the
# arc length attribute of the curve info node can be used to set up
# an expression, ie. it drives one of the scale factors of surface1.
#
# Note the expression command still only creates MEL expressions, although they can
# be called from Python.