Skip to content

Commit

Permalink
previews fix
Browse files Browse the repository at this point in the history
  • Loading branch information
franMarz authored Aug 9, 2020
1 parent c9b684a commit 9ab565d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
15 changes: 7 additions & 8 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ def icon_get(name):



def menu_IMAGE_uvs(self, context):
'''def menu_IMAGE_uvs(self, context):
layout = self.layout
layout.separator()
layout.operator(op_uv_resize.op.bl_idname, text="Resize", icon_value = icon_get("op_extend_canvas_open"))
Expand All @@ -1295,7 +1295,7 @@ def menu_IMAGE_uvs(self, context):
layout.operator(op_island_align_edge.op.bl_idname, text="Align Edge", icon_value = icon_get("op_island_align_edge"))
layout.operator(op_island_align_world.op.bl_idname, text="Align World", icon_value = icon_get("op_island_align_world"))
layout.menu(VIEW3D_MT_submenu_align)
layout.menu(VIEW3D_MT_submenu_align)'''

class VIEW3D_MT_submenu_align(bpy.types.Menu):
bl_label="Align"
Expand Down Expand Up @@ -1435,7 +1435,7 @@ def register():
for icon in icons:
utilities_ui.icon_register(icon)

bpy.types.IMAGE_MT_uvs.append(menu_IMAGE_uvs)
#bpy.types.IMAGE_MT_uvs.append(menu_IMAGE_uvs)
bpy.types.IMAGE_MT_select.append(menu_IMAGE_select)
bpy.types.IMAGE_MT_image.append(menu_IMAGE_MT_image)
bpy.types.VIEW3D_MT_object.append(menu_VIEW3D_MT_object)
Expand All @@ -1447,14 +1447,10 @@ def register():


def unregister():
#GUI Utilities
# utilities_ui.unregister()

from bpy.utils import unregister_class
for cls in reversed(classes):
unregister_class(cls)


#Unregister Settings
del bpy.types.Scene.texToolsSettings

Expand All @@ -1463,7 +1459,10 @@ def unregister():
km.keymap_items.remove(kmi)
keymaps.clear()

bpy.types.IMAGE_MT_uvs.remove(menu_IMAGE_uvs)
#GUI Utilities
utilities_ui.unregister()

#bpy.types.IMAGE_MT_uvs.remove(menu_IMAGE_uvs)
bpy.types.IMAGE_MT_select.remove(menu_IMAGE_select)
bpy.types.IMAGE_MT_image.remove(menu_IMAGE_MT_image)
bpy.types.VIEW3D_MT_object.remove(menu_VIEW3D_MT_object)
Expand Down
5 changes: 3 additions & 2 deletions utilities_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,13 @@ def unregister():
from bpy.types import WindowManager
for preview_collection in preview_collections.values():
bpy.utils.previews.remove(preview_collection)
preview_collections.clear()
preview_collection.clear()


# Unregister icons
# global preview_icons
bpy.utils.previews.remove(preview_icons)
# bpy.utils.previews.remove(preview_icons)
preview_icons.clear()


del bpy.types.Scene.TT_bake_mode
Expand Down

0 comments on commit 9ab565d

Please sign in to comment.