Made the add-on more compatible with 2.80 and 2.79

This commit is contained in:
2018-09-04 13:47:44 +02:00
parent 973dafcc3a
commit b35d7bc5f3
6 changed files with 71 additions and 52 deletions

View File

@@ -327,7 +327,12 @@ def register():
bpy.utils.register_class(PILLAR_OT_image_share)
bpy.types.IMAGE_MT_image.append(image_editor_menu)
bpy.types.INFO_MT_window.append(window_menu)
try:
menu = bpy.types.TOPBAR_MT_window
except AttributeError:
# Blender < 2.80
menu = bpy.types.INFO_MT_window
menu.append(window_menu)
def unregister():