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
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???