The script I have made inverts the vertex color per vert on an EditableMesh object using Meshop's.
(ex:This is the meat and potatoes of the script.)
for i=1 to myObj.numVerts do
(
my_color = getVertColor myObj i
newVColor = color (255 - my_color.r) (255 - my_color.g) (255 - my_color.b)
meshop.setVertColor myObj V_Channel i newVColor
)
However, the result is different depending on how the vertex colors were applied.
QUESTION: Anyone know what the difference is between these two vert color workflows? And why I get a different result?
EXAMPLE: Vert color applied using VertPaint modifier vs Vert color applied using the "Edit Vertex Color" in Vert Properties of editable poly.
Replies
http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/files/GUID-5702AD16-5D90-4B74-A7E7-F49A8B6903C0.htm
I was able to reproduce your problem with your code, and the following code works for me at least.
I really learned a ton with this one. But I want to add the ability to compare the MapVerts that are all the same MeshVert, and get the weighted value of each MapVerts color to determine what the actual color should be and set each similar Mapvert to that value, instead of just overwriting previous values based on vert order.
Thanks again! If you are interested, the script can be found here: MAXScript Adventures: Invert Vertex Colors