I thought a sure fire way to detect the number of sides of a polygon was via the vertex count of a polygon.
This does not seem to be the case when you mix triangles and quads.
This short script counts the number of sides for each face in the mesh. As you can see by the image there are two quads and two triangles and no duplicate vertices.
However the script gets it wrong. It prints out that there are in fact 3 quads and 1 triangle which is clearly not what is displayed in the viewport.
What am I doing wrong? Is this an API bug?
27_arnold_quads_triangle_colors_1a.blend (86.7 KB)