What does face color denote in viewport in edit mode?

Basically the question is: why do I have some of the faces with different color in portview when I switch to edit mode?


The object was actually separated from the bigger object.

Maybe double geometry and inverted normals.

I’ve flipped all the normals outwards, but it definitely can be double geometry.

Thanks!

Not sure what it was actually, but I’ve fixed it :smiley:
I was doing manipulation on mesh with a script with a bmesh module, namely selecting part of the object and separating it from the object. For some reason calling from_mesh after the object was separated in my bmesh object wasn’t enough, and apparently I was selecting faces from bmesh for separation, which were already removed from object itself, so it kinda caused some mad invalid faces duplication into multiple objects :smiley:

So I actually replaced the code with a deletion of my bmesh, creating new bmesh and calling from_mesh again. Not sure how relevant python code for this forum, but I’ll still post a solution.

Old code, that caused this issue was:


        bpy.ops.object.mode_set(mode = 'EDIT')
        bpy.ops.mesh.separate(type='SELECTED')
        mesh.from_mesh(obj)

I’ve changed to:


        bpy.ops.object.mode_set(mode = 'EDIT')
        bpy.ops.mesh.separate(type='SELECTED')

        del mesh
        mesh = bmesh.new()
        mesh.from_mesh(obj)

In any case, thaks, JA12, your comment about duplicate geometry has set me on the right course :smiley: