I’m trying to create a Python script to add an Image empty object. I managed to create the empty object and to load the image into Blender, but I don’t know how to associate one with the other…
My code so far:
bpy.ops.object.add(type = ‘EMPTY’)
context.object.name = ‘ICON’
context.object.empty_draw_type = ‘IMAGE’
context.object.empty_draw_size = 5
bpy.ops.image.open(filepath = ‘C:/images/myicon.png’)