Hey all. I have the code below(part of it) to set different vertex colors
per uv island, but I was told that setting vertex colors with cmds is quite
*slow*, and *mFnMesh.setFaceColors *would be faster. With my current code
how can I apply the vertex colors to the selection of faces using the new
method? Thank you
for shell in chunk:
selection_shell = shells.get(shell)
cmds.select(selection_shell)
facesSel = cmds.polyListComponentConversion(fromUV=True,
toFace=True)
cmds.select(facesSel)
r = [random.random() for i in range(3)]
cmds.polyColorPerVertex(facesSel,rgb=(r[0], r[1], r[2]), cdo=1 )
cmds.select(deselect=1)
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/88065c09-91d5-4bba-bdc8-164c3731e496n%40googlegroups.com.