pymel.core.modeling.polyColorPerVertex

static modeling.polyColorPerVertex(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
alpha (a) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the alpha channel of color
clamped (cla) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
This flag specifies if the color set will truncate any value that is outside 0 to 1 range.
colorB (b) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the B channel of color
colorDisplayOption (cdo) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Change the display options on the mesh to display the vertex colors.
colorG (g) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the G channel of color
colorR (r) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the R channel of color
colorRGB (rgb) float, float, float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the RGB channels of color
notUndoable (nun) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When used, the color values specified are added relative to the current values.
remove (rem) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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 ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

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 )

Previous topic

pymel.core.modeling.polyColorMod

Next topic

pymel.core.modeling.polyColorSet

Core

Core Modules

Other Modules

This Page