Command associates color(rgb and alpha) with vertices on polygonal objects. When used with the query flag, it returns the color associated with the specified components.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
alpha (a) | float | ||
|
|||
clamped (cla) | bool | ||
|
|||
colorB (b) | float | ||
|
|||
colorDisplayOption (cdo) | bool | ||
|
|||
colorG (g) | float | ||
|
|||
colorR (r) | float | ||
|
|||
colorRGB (rgb) | float, float, float | ||
|
|||
notUndoable (nun) | bool | ||
Execute the command, but without having the command be undoable. This option will greatly improve performance for large numbers of object. This will make the command not undoable regardless of whether undo has been enabled or not. |
|||
relative (rel) | bool | ||
|
|||
remove (rem) | bool | ||
When used, the color values are removed from the selected or specified objects or components. This option only supports meshes with no construction history, or meshes whose construction history includes a recent polyColorPerVertexNode. For meshes whose construction history includes a polgon operation the polyColorPerVertexNode, consider using the polyColorDel command instead |
|||
representation (rpt) | int | ||
This flag corresponds to the color channels to used, for example A(alpha only), RGB, and RGBA. Flag can have multiple arguments, passed either as a tuple or a list. |
Derived from mel command maya.cmds.polyColorPerVertex
Example:
import pymel.core as pm
# To set the rgb channels of selected vertices:
pm.polyColorPerVertex( rgb=(0.8, 0.0, 0.4) )
# To set just the "g" channel of selected vertices:
pm.polyColorPerVertex( g =0.5 )
# To add to the current value of just the "g" channel of selected vertices:
pm.polyColorPerVertex( rel=True, g =0.2 )
# To query the "g" and "b" channels of color on selected vertices:
pm.polyColorPerVertex( query=True, g=True, b=True )