Originally Posted by Pjanssen
Can you post a more complete bit of code which shows the failure?
And a little pedantic note, you for loop can be a bit simpler
for (int i=0; i < b.Verts.Count; i++)
... it was simply a result of me having confusion for a bit because of 0-based arrays in .NEt and 1-based in MAXScript... I was changing those around as I messed with it and left it at the last iteration that worked.
Originally Posted by claude666
one thing that comes to mind as in with scripting max meshes the same applies to the SDK
number of verts does not always equal number of color verts
Yes, that is true. But in these specific objects, there is always a 1-to-1 number of verts > mapverts > color verts. The type of object I'm dealing with isn't valid any other way... and the ordering of the data is always in the ordering of the verts... which is why the loop is on the verts rather than the faces--because this specific function needs to get all the info from vert 0/1 (depending on SDK/MAXScript) to the end in the mesh and output in that order.
I think my dilemma is solved, though. I had been assuming that the data for Vertex Colors was stored separately than the Map Verts. It turns out that getting the Map Verts is all I need.
So in the context of the example above (modified for a Value between 0-255, which is what I really wanted but hadn't mentioned it because it didn't matter to me yet):
R+= (b.MapVerts(-2)[i].X * 255).ToString();