1
0
mirror of https://github.com/drewcassidy/TexTools-Blender synced 2024-09-01 14:54:44 +00:00

Properly unregister all previews

This commit is contained in:
Andrew Cassidy 2019-12-24 18:18:33 -08:00
parent 3677565a23
commit 204f5991a0
No known key found for this signature in database
GPG Key ID: 963017B38FD477A1
2 changed files with 7 additions and 0 deletions

View File

@ -1467,6 +1467,9 @@ def unregister():
for cls in reversed(classes):
unregister_class(cls)
#Unregister Icons
utilities_ui.icon_unregister()
#Unregister Settings
del bpy.types.Scene.texToolsSettings

View File

@ -62,6 +62,10 @@ def icon_register(fileName):
preview_icons.load(name, os.path.join(icons_dir, fileName), 'IMAGE')
def icon_unregister():
preview_icons.clear()
def get_padding():
size_min = min(
bpy.context.scene.texToolsSettings.size[0], bpy.context.scene.texToolsSettings.size[1])