I was trying to change the colors of the vertices of a cube in maya using pymel. My goal was to create a shaded cube. However, when I run the following code nothing changes. Any idea?
cube, pcube = pmc.polyCube()
for v in cube.vtx:
v.setColor([1, 0, 0, 1])
print v.getColor()
cube.updateSurface()
To my surprise, the color I set gets printed correctly but the colors of the vertices don't change on the screen. Moreover, when I use setPosition
to change the position of a vertex it actually works fine.
Thanks for your time.