I'm trying to convert a Vertex Color Set's Alpha data into RGB color data...
I figured this would be easy to do in MEL, but my script is failing, i think, because of the large number of vertices (the script terminates at the 739 vert, the mesh has 11000 vertices).
here is my script:
CODE
$verts=ls -sl -flatten
;
int $i=0;
for ($i=0; $i<size($verts); $i++)
{
//select -r $verts[$i];
$alpha=polyColorPerVertex -q -a $verts[$i]
;
//print ("Alpha = " + $alpha[0] + "\n");
$roundedValue=roundoff $alpha[0] 3
;
//print ($roundedValue + "\n");
polyColorPerVertex -rgb $roundedValue $roundedValue $roundedValue $verts[$i];
polyColorPerVertex -a 1 $verts[$i];
print ($i + " of " + size($verts) + "\n");
}
print "done...\n";
Also, i've been trying to export vertex color data using the Export Attributes Maps within the Paint Vertex Color tool, but the resulting map has a faceted look instead of a smooth look...the Maya docs are painfully vague on the topic of exporting attribute maps, so any help or tips greatly appreciated...
thanks.