what is the meaning of these colours in edit-mode?

Trying to repair add_visualizer.py I experimented with a Python script to
use an empty as ‘information’ object.

And I got this picture, the strange colour, only running a script and going to edit-mode

http://ezpicshare.com/images/strangecol.jpg

I used this script


def makeCoordObject():
    edit_mode = False
    if bpy.context .mode == "EDIT_MESH":        
        print("edit mode")
        obj = bpy.context.active_object
        edit_mode = True
        bpy.ops.object.editmode_toggle()     
        obj.select = False
        try:
            bpy.data.objects["PKHGcoordinatesObject"]
#        bpy.context.active_object.select = False
        except:
            bpy.ops.object.add(type='EMPTY', view_align=False, enter_editmode=False, location=(1,1,-1), rotation=(0, 1, 0), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
            empty = bpy.context.active_object
            empty.name ="PKHGcoordinatesObject"
            empty.select = False
            empty["display_indices"] = 0
    else: print("wrong mode")   
    if edit_mode:
        bpy.context.scene.objects.active = obj

        obj.select = True
        bpy.ops.object.editmode_toggle()
    return edit_mode

res = makeCoordObject()
if res:
    emptyPKHG = bpy.data.objects["PKHGcoordinatesObject"]
    print(emptyPKHG["display_indices"]) 

But trying again, I can not reproduce it …

So, what have I done to get this different edit-mode picture???

It looks like it’s “active” but not selected. For example you can select multiple objects then deselect the active one leaving the object high-lighted. You can’t switch to edit mode using the UI in this case but since you’re forcing the mode in the code it’s switching anyway.

Try setting select for object (that you turned off in top section when changing mode) and active.

I could be wrong but that’s my best guess.

They have edge crease. CTRL+E -> Edge Crease then move mouse up or down to change amount. Maybe the script changed edge crease.

Shift + E
Yes, edge crease. Add a subsurf modifier and you will see them acting