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

Synopsis

weightsColor( [objects...] , [colorRamp=string], [deformer=string], [falseColor=boolean], [outOfRangeColor=[float, float, float]], [rampMaxColor=[float, float, float]], [rampMinColor=[float, float, float]], [useColorRamp=boolean], [useMaxMinColor=boolean])

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

weightsColor is undoable, queryable, and NOT editable.

Controls the coloring of deformer weights.

Return value

string[]For query operation

In query mode, return type is based on queried flag.

Flags

colorRamp, deformer, falseColor, outOfRangeColor, rampMaxColor, rampMinColor, useColorRamp, useMaxMinColor
Long name (short name) Argument types Properties
colorRamp(cr) string query
Allows a user defined color ramp to be used to map values to colors.
deformer(dfm) string query
Specify the deformer that needs to be visualized.
falseColor(fc) boolean query
Enable or disable false color display on the geometry.
outOfRangeColor(orc) [float, float, float] query
Defines a special color to be used for the areas outside the deformers subset.
rampMaxColor(rxc) [float, float, float] query
Defines a special color to be used when the value is greater than or equal to the maximum value.
rampMinColor(rmc) [float, float, float] query
Defines a special color to be used when the value is less than or equal to the minimum value.
useColorRamp(ucr) boolean query
Specifies whether the user defined color ramp should be used to map values from to colors. If this is turned off, the default greyscale feedback will be used.
useMaxMinColor(umc) boolean query
Specifies whether the out of range colors should be used. See rampMinColor and rampMaxColor flags for further details.

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.

Python examples

import maya.cmds as cmds

# Turn on weight visualization for the cluster1 deformer on pSphere1
cmds.weightsColor('pSphere1', fc=True, dfm='cluster1')

# Turn off weight visualization for pSphere1
cmds.weightsColor('pSphere1', fc=False)

# Turn of the colorRamp
cmds.weightsColor(useColorRamp=False)

# Use a purple min color and green max color
cmds.weightsColor(umc=True, rmc=(1.0,0.0,1.0), rxc=(0.0,1.0,0.0))

# Set the outOfRange color for verts outside the deformers subset
cmds.weightsColor(orc=(0.0,1.0,1.0))