From f38d32e37cd570dd99a0d5c252ff509ad05f5e55 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 7 Jun 2014 22:41:19 -0400 Subject: [PATCH] Remove operators when unloading Korman. No need to keep cruft around! --- korman/__init__.py | 3 ++- korman/operators/__init__.py | 3 +++ korman/operators/op_export.py | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/korman/__init__.py b/korman/__init__.py index 60f41bf..01a81a1 100644 --- a/korman/__init__.py +++ b/korman/__init__.py @@ -20,7 +20,7 @@ from . import operators, properties, ui bl_info = { "name": "Korman", "author": "Guild of Writers", - "blender": (2, 67, 0), # I can't be bothered to support old stuff + "blender": (2, 70, 0), # I can't be bothered to support old stuff "location": "File > Import-Export", "description": "Exporter for Cyan Worlds' Plasma Engine", "warning": "alpha", @@ -43,6 +43,7 @@ def register(): def unregister(): """Unregisters all Blender operators and GUI items""" bpy.utils.unregister_module(__name__) + operators.unregister() if __name__ == "__main__": diff --git a/korman/operators/__init__.py b/korman/operators/__init__.py index 0219f4e..fc9150b 100644 --- a/korman/operators/__init__.py +++ b/korman/operators/__init__.py @@ -18,3 +18,6 @@ from . import op_world as world def register(): exporter.register() + +def unregister(): + exporter.unregister() diff --git a/korman/operators/op_export.py b/korman/operators/op_export.py index 148ff9e..75c4d81 100644 --- a/korman/operators/op_export.py +++ b/korman/operators/op_export.py @@ -96,3 +96,6 @@ def menu_cb(self, context): def register(): bpy.types.INFO_MT_file_export.append(menu_cb) + +def unregister(): + bpy.types.INFO_MT_file_export.remove(menu_cb)