From a75bd5dec43fa3e633538cc8b996169a1d845ba2 Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Tue, 30 Jun 2015 17:02:21 +1000 Subject: [PATCH] Register individual classes instead of per-module --- io_mesh_ply/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py index cceb41868..7e2a70376 100644 --- a/io_mesh_ply/__init__.py +++ b/io_mesh_ply/__init__.py @@ -180,15 +180,23 @@ def menu_func_export(self, context): self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)") +classes = ( + ImportPLY, + ExportPLY, + ) + + def register(): - bpy.utils.register_module(__name__) + for cls in classes: + bpy.utils.register_class(cls) bpy.types.INFO_MT_file_import.append(menu_func_import) bpy.types.INFO_MT_file_export.append(menu_func_export) def unregister(): - bpy.utils.unregister_module(__name__) + for cls in classes: + bpy.utils.unregister_class(cls) bpy.types.INFO_MT_file_import.remove(menu_func_import) bpy.types.INFO_MT_file_export.remove(menu_func_export) -- GitLab