[Bf-extensions-cvs] [a75bd5d] master: Register individual classes instead of per-module
Campbell Barton
noreply at git.blender.org
Thu Jul 9 14:20:34 CEST 2015
Commit: a75bd5dec43fa3e633538cc8b996169a1d845ba2
Author: Campbell Barton
Date: Tue Jun 30 17:02:21 2015 +1000
Branches: master
https://developer.blender.org/rBAa75bd5dec43fa3e633538cc8b996169a1d845ba2
Register individual classes instead of per-module
===================================================================
M io_mesh_ply/__init__.py
===================================================================
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index cceb418..7e2a703 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)
More information about the Bf-extensions-cvs
mailing list