Go to: Synopsis. Flags. Return value. Related. Python examples.
percent(
<weighted node name> [objects]
, [addPercent=boolean], [after=boolean], [before=boolean], [deformerTool=boolean], [dropoffAxis=[double, double, double]], [dropoffCurve=string], [dropoffDistance=double], [dropoffPosition=[double, double, double]], [dropoffType=string], [exclusive=boolean], [frontOfChain=boolean], [geometry=string], [ignoreSelected=boolean], [multiplyPercent=boolean], [name=string], [prune=boolean], [remove=boolean], [split=boolean], [value=double])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
percent is undoable, queryable, and editable.
This command sets percent values on members of a
weighted node such as a cluster or a jointCluster.
With no flags specified the command sets the percent value
for selected components of the specified node to the specified
percent value. A dropoff from the specified percent value to 0
can be specifed from a point, plane or curve using a dropoff distance
around that shape. The percent value can also be added or multiplied
with existing percent values of the node components.
addPercent, after, before, deformerTool, dropoffAxis, dropoffCurve, dropoffDistance, dropoffPosition, dropoffType, exclusive, frontOfChain, geometry, ignoreSelected, multiplyPercent, name, prune, remove, split, value
Long name (short name) |
[argument types] |
Properties |
name(n)
|
string
|
|
|
Used to specify the name of the node being created
|
|
geometry(g)
|
string
|

|
|
The specified object will be added to the list of
objects being deformed by this deformer object, unless
the -rm flag is also specified. When queried, this flag
returns string string string ...
In query mode, this flag needs a value.
|
|
remove(rm)
|
boolean
|
|
|
Specifies that objects listed after the -g flag should
be removed from this deformer.
|
|
before(bf)
|
boolean
|
|
|
If the default behavior for insertion/appending into/onto
the existing chain is not what you want then you can use
this flag to force the command to stick the deformer
node before the selected node in the chain even if
a new geometry shape has to be created in order to do so
|
|
after(af)
|
boolean
|
|
|
If the default behavior for insertion/appending into/onto
the existing chain is not what you want then you can use
this flag to force the command to stick the deformer
node after the selected node in the chain even if
a new geometry shape has to be created in order to do so
|
|
split(sp)
|
boolean
|
|
|
Branches off a new chain in the dependency graph instead
of inserting/appending the deformer into/onto an
existing chain.
|
|
frontOfChain(foc)
|
boolean
|
|
|
This command is used to specify that the new deformer
node should be placed ahead (upstream) of existing deformer
and skin nodes in the shape's history (but not ahead of
existing tweak nodes). The input to the
deformer will be the upstream shape rather than the visible
downstream shape, so the behavior of this flag is the most
intuitive if the downstream deformers are in their reset
(hasNoEffect) position when the new deformer is added.
|
|
ignoreSelected(ignoreSelected)
|
boolean
|
|
|
Tells the command to not deform objects on the
current selection list
|
|
deformerTool(dt)
|
boolean
|
|
|
Returns the name of the deformer tool objects (if any)
as string string ...
In query mode, this flag needs a value.
|
|
prune(pr)
|
boolean
|
|
|
Removes any points not being deformed by the deformer in
its current configuration from the deformer set.
|
|
exclusive(ex)
|
boolean
|

|
|
Puts the deformation set in a deform partition.
In query mode, this flag needs a value.
|
|
value(v)
|
double
|

|
|
The percent value to be applied. The default is 1. In query mode,
returns an array of doubles corresponding to the weights of the
selected object components.
In query mode, this flag needs a value.
|
|
dropoffPosition(dp)
|
[double, double, double]
|
|
|
Specifies the point around which to dropoff the percent value.
|
|
dropoffAxis(dax)
|
[double, double, double]
|
|
|
Specifies the axis along which to dropoff the percent value,
starting from the dropoffPosition.
|
|
dropoffCurve(dc)
|
string
|
|
|
Specifies the curve around which to dropoff the percent value.
|
|
dropoffDistance(dds)
|
double
|
|
|
Specifies the dropoff distance from the point, plane or curve
that was specified using the -dp -dax or -dc flags.
|
|
dropoffType(dt)
|
string
|
|
|
Specifies the type of dropoff. Used in conjunction with
the -dp, -dax or -dc flags. Default is linear.
Valid values are: linear, sine, exponential, linearSquared, none.
|
|
addPercent(ap)
|
boolean
|
|
|
Add the percent value specified with the -v flag to the existing percent values
|
|
multiplyPercent(mp)
|
boolean
|
|
|
Multiply the percent value specified with the -v flag with existing percent values
|
|
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.
|
None
cluster, deformer, flexor, lattice, sculpt, wire, wrinkle
import maya.cmds as cmds
# set percents on the selected items to 0.6
#
cmds.percent( 'cluster1', v=0.6 )
# set percents on the selected items dropping off along the
# z-axis starting at the origin. Dropoff distance is 5, and
# the initial value is 1. Dropoff type is linear.
#
cmds.percent( 'cluster1', dp=(0, 0, 0), dax=(0, 0, 1), dt='linear', dds=5, v=1 )
# set percents on the selected items dropping off along
# curve1. Dropoff distance is 5, and
# the initial value is 0.3.
#
cmds.percent( 'cluster2', dc='curve2', dds=3, v=0.3 )
# add 0.1 to the percents of the selected items
#
cmds.percent( 'cluster1', v=0.1, ap=True )