Okay, I need help again.
I've got a model with colored vertices. So far, there are only two colors applyed (red and white. It's a reference model which I use to define the script for automation). I need to select all white polygons in that model, so I can select them and hand the selection over to another function which generates another model based on the selection. Selecting the vertices is posing a problem, as vertices can have more than one color at once. So I tried to use the polygons.
Now, these polygons should have a color, right? How do I extract the color values so I can do something like this ((very) pseudo code):
for polygon in mesh.polygons: if polygon.color == red: plygon.selected = True
I read through other questions, but they all want to apply another color to a polygon. I don't need that. The color is already there. And it seems I have dive more into python to extract the snippets which would do the trick for me from the other answers.
poly.material_index. The material has a color. For vertex color see blender.stackexchange.com/questions/121933/… $\endgroup$