From 61d5b389e2424ff22576cc07b99260f952f6f97b Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Fri, 11 Feb 2011 01:29:13 +0000
Subject: [PATCH] add in module register calls (first pass, batch replace, will
 test each addon next).

---
 add_curve_aceous_galore.py               | 4 ++++
 add_curve_torus_knots.py                 | 4 ++++
 add_mesh_3d_function_surface.py          | 4 ++++
 add_mesh_BoltFactory/__init__.py         | 4 ++++
 add_mesh_ant_landscape.py                | 4 ++++
 add_mesh_extras.py                       | 4 ++++
 add_mesh_gears.py                        | 4 ++++
 add_mesh_gemstones.py                    | 4 ++++
 add_mesh_pipe_joint.py                   | 4 ++++
 add_mesh_solid.py                        | 4 ++++
 add_mesh_twisted_torus.py                | 4 ++++
 animation_add_corrective_shape_key.py    | 4 ++++
 animation_animall.py                     | 4 ++++
 animation_rotobezier.py                  | 4 ++++
 curve_simplify.py                        | 4 ++++
 development_icon_get.py                  | 4 ++++
 game_engine_save_as_runtime.py           | 4 ++++
 io_anim_bvh/__init__.py                  | 4 ++++
 io_anim_camera.py                        | 4 ++++
 io_coat3D/__init__.py                    | 4 ++++
 io_coat3D/coat.py                        | 4 ++++
 io_convert_image_to_mesh_img/__init__.py | 4 ++++
 io_export_directx_x.py                   | 4 ++++
 io_export_pc2.py                         | 4 ++++
 io_export_unreal_psk_psa.py              | 4 ++++
 io_import_gimp_image_to_scene.py         | 4 ++++
 io_import_images_as_planes.py            | 4 ++++
 io_import_scene_dxf.py                   | 4 ++++
 io_import_scene_lwo.py                   | 4 ++++
 io_import_scene_mhx.py                   | 4 ++++
 io_import_scene_unreal_psk.py            | 4 ++++
 io_mesh_ply/__init__.py                  | 4 ++++
 io_mesh_raw/__init__.py                  | 4 ++++
 io_mesh_stl/__init__.py                  | 4 ++++
 io_scene_3ds/__init__.py                 | 4 ++++
 io_scene_fbx/__init__.py                 | 4 ++++
 io_scene_m3/__init__.py                  | 4 ++++
 io_scene_obj/__init__.py                 | 4 ++++
 io_scene_x3d/__init__.py                 | 4 ++++
 io_shape_mdd/__init__.py                 | 4 ++++
 mesh_relax.py                            | 4 ++++
 mesh_surface_sketch.py                   | 4 ++++
 object_add_chain.py                      | 4 ++++
 object_animrenderbake.py                 | 4 ++++
 object_cloud_gen.py                      | 4 ++++
 object_fracture/__init__.py              | 4 ++++
 render_povray/__init__.py                | 4 ++++
 render_renderfarmfi.py                   | 4 ++++
 rigify/__init__.py                       | 4 ++++
 rigify/metarig_menu.py                   | 4 ++++
 rigify/ui.py                             | 4 ++++
 space_view3d_3d_navigation.py            | 8 ++++++--
 space_view3d_align_tools.py              | 4 ++++
 space_view3d_copy_attributes.py          | 4 ++++
 space_view3d_materials_utils.py          | 4 ++++
 space_view3d_math_vis/__init__.py        | 4 ++++
 space_view3d_panel_measure.py            | 4 ++++
 space_view3d_spacebar_menu.py            | 4 ++++
 system_blend_info.py                     | 4 ++++
 system_property_chart.py                 | 4 ++++
 text_editor_api_navigator.py             | 4 ++++
 61 files changed, 246 insertions(+), 2 deletions(-)

diff --git a/add_curve_aceous_galore.py b/add_curve_aceous_galore.py
index fcc275026..ad8260119 100644
--- a/add_curve_aceous_galore.py
+++ b/add_curve_aceous_galore.py
@@ -1134,9 +1134,13 @@ def Curveaceous_galore_button(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_curve_add.append(Curveaceous_galore_button)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_curve_add.remove(Curveaceous_galore_button)
 
 if __name__ == "__main__":
diff --git a/add_curve_torus_knots.py b/add_curve_torus_knots.py
index 53c0afed8..95eace803 100644
--- a/add_curve_torus_knots.py
+++ b/add_curve_torus_knots.py
@@ -234,9 +234,13 @@ def torus_knot_plus_button(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_curve_add.append(torus_knot_plus_button)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_curve_add.remove(torus_knot_plus_button)
 
 if __name__ == "__main__":
diff --git a/add_mesh_3d_function_surface.py b/add_mesh_3d_function_surface.py
index 322ae7073..5716e832f 100644
--- a/add_mesh_3d_function_surface.py
+++ b/add_mesh_3d_function_surface.py
@@ -514,12 +514,16 @@ def menu_func_xyz(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     # Add menus to the "Add Mesh" menu
     space_info.INFO_MT_mesh_add.append(menu_func_z)
     space_info.INFO_MT_mesh_add.append(menu_func_xyz)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # Remove menus from the "Add Mesh" menu.
     space_info.INFO_MT_mesh_add.remove(menu_func_z)
     space_info.INFO_MT_mesh_add.remove(menu_func_xyz)
diff --git a/add_mesh_BoltFactory/__init__.py b/add_mesh_BoltFactory/__init__.py
index 256c4f810..bca635739 100644
--- a/add_mesh_BoltFactory/__init__.py
+++ b/add_mesh_BoltFactory/__init__.py
@@ -46,10 +46,14 @@ def add_mesh_bolt_button(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_mesh_add.append(add_mesh_bolt_button)
     #bpy.types.VIEW3D_PT_tools_objectmode.prepend(add_mesh_bolt_button) #just for testing
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_mesh_add.remove(add_mesh_bolt_button)
     #bpy.types.VIEW3D_PT_tools_objectmode.remove(add_mesh_bolt_button) #just for testing
     
diff --git a/add_mesh_ant_landscape.py b/add_mesh_ant_landscape.py
index f0a38b328..822759d4f 100644
--- a/add_mesh_ant_landscape.py
+++ b/add_mesh_ant_landscape.py
@@ -806,9 +806,13 @@ def menu_func_landscape(self, context):
     self.layout.operator(landscape_add.bl_idname, text="Landscape", icon="PLUGIN")
 
 def register():
+    bpy.utils.register_module(__name__)
+
     space_info.INFO_MT_mesh_add.append(menu_func_landscape)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     space_info.INFO_MT_mesh_add.remove(menu_func_landscape)
 
 if __name__ == "__main__":
diff --git a/add_mesh_extras.py b/add_mesh_extras.py
index 423677f42..c3ee6d3d4 100644
--- a/add_mesh_extras.py
+++ b/add_mesh_extras.py
@@ -530,11 +530,15 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     # Add "Extras" menu to the "Add Mesh" menu
     space_info.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # Remove "Extras" menu from the "Add Mesh" menu.
     space_info.INFO_MT_mesh_add.remove(menu_func)
 
diff --git a/add_mesh_gears.py b/add_mesh_gears.py
index a623ce48f..19c658f9a 100644
--- a/add_mesh_gears.py
+++ b/add_mesh_gears.py
@@ -820,11 +820,15 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     # Add "Gears" entry to the "Add Mesh" menu.
     bpy.types.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # Remove "Gears" entry from the "Add Mesh" menu.
     bpy.types.INFO_MT_mesh_add.remove(menu_func)
 
diff --git a/add_mesh_gemstones.py b/add_mesh_gemstones.py
index 3cd37157a..a10af4834 100644
--- a/add_mesh_gemstones.py
+++ b/add_mesh_gemstones.py
@@ -356,11 +356,15 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     # Add "Gemstones" menu to the "Add Mesh" menu
     space_info.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # Remove "Gemstones" menu from the "Add Mesh" menu.
     space_info.INFO_MT_mesh_add.remove(menu_func)
 
diff --git a/add_mesh_pipe_joint.py b/add_mesh_pipe_joint.py
index 168bd5976..8e7c96757 100644
--- a/add_mesh_pipe_joint.py
+++ b/add_mesh_pipe_joint.py
@@ -1135,11 +1135,15 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     # Add "Pipe Joints" menu to the "Add Mesh" menu
     space_info.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # Remove "Pipe Joints" menu from the "Add Mesh" menu.
     space_info.INFO_MT_mesh_add.remove(menu_func)
 
diff --git a/add_mesh_solid.py b/add_mesh_solid.py
index 5bf081283..037375430 100644
--- a/add_mesh_solid.py
+++ b/add_mesh_solid.py
@@ -804,9 +804,13 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     space_info.INFO_MT_mesh_add.append(menu_func)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     space_info.INFO_MT_mesh_add.remove(menu_func)
       
 if __name__ == "__main__":
diff --git a/add_mesh_twisted_torus.py b/add_mesh_twisted_torus.py
index e33cf9c17..779d2ab05 100644
--- a/add_mesh_twisted_torus.py
+++ b/add_mesh_twisted_torus.py
@@ -259,10 +259,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_mesh_add.remove(menu_func)
 
 if __name__ == "__main__":
diff --git a/animation_add_corrective_shape_key.py b/animation_add_corrective_shape_key.py
index 49967b103..41d34aaee 100644
--- a/animation_add_corrective_shape_key.py
+++ b/animation_add_corrective_shape_key.py
@@ -490,8 +490,12 @@ def modifiers_draw(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.MESH_MT_shape_key_specials.append( vgroups_draw )
     bpy.types.DATA_PT_modifiers.append( modifiers_draw )
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
diff --git a/animation_animall.py b/animation_animall.py
index ae6e885c3..bea815214 100644
--- a/animation_animall.py
+++ b/animation_animall.py
@@ -277,9 +277,13 @@ class ANIM_OT_clear_animation_animall(bpy.types.Operator):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     pass
     
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
     
 if __name__ == "__main__":
diff --git a/animation_rotobezier.py b/animation_rotobezier.py
index d7d44c05b..a7f8f2229 100644
--- a/animation_rotobezier.py
+++ b/animation_rotobezier.py
@@ -369,9 +369,13 @@ class CURVE_OT_toggle_draw_rotobezier(bpy.types.Operator):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     pass
     
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
     
 if __name__ == "__main__":
diff --git a/curve_simplify.py b/curve_simplify.py
index 8533769dd..55aed13c0 100644
--- a/curve_simplify.py
+++ b/curve_simplify.py
@@ -584,9 +584,13 @@ class CURVE_OT_simplify(bpy.types.Operator):
 #### REGISTER ###################################
 #################################################
 def register():
+    bpy.utils.register_module(__name__)
+
     pass
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
 
 if __name__ == "__main__":
diff --git a/development_icon_get.py b/development_icon_get.py
index 10d8b4dab..b0ed6cd95 100644
--- a/development_icon_get.py
+++ b/development_icon_get.py
@@ -211,6 +211,8 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.Scene.icon_props = bpy.props.PointerProperty(type = IconProps)
     IconProps.console = bpy.props.BoolProperty(name='Show System Icons',
         description='Display the Icons in the console header', default=False)
@@ -231,6 +233,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     if bpy.context.scene.get('icon_props') != None:
         del bpy.context.scene['icon_props']
     try:
diff --git a/game_engine_save_as_runtime.py b/game_engine_save_as_runtime.py
index beacbbc24..ede30efb9 100644
--- a/game_engine_save_as_runtime.py
+++ b/game_engine_save_as_runtime.py
@@ -207,10 +207,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 
diff --git a/io_anim_bvh/__init__.py b/io_anim_bvh/__init__.py
index a5c57d9b6..96e034f09 100644
--- a/io_anim_bvh/__init__.py
+++ b/io_anim_bvh/__init__.py
@@ -121,11 +121,15 @@ def menu_func_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     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__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func_import)
     bpy.types.INFO_MT_file_export.remove(menu_func_export)
 
diff --git a/io_anim_camera.py b/io_anim_camera.py
index 1a34fdc27..592c59445 100644
--- a/io_anim_camera.py
+++ b/io_anim_camera.py
@@ -155,10 +155,14 @@ def menu_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_export.append(menu_export)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_export.remove(menu_export)
 
 
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 0a7d5d8ff..b6aecccb3 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -46,6 +46,8 @@ from bpy.props import *
 
     
 def register():
+    bpy.utils.register_module(__name__)
+
 
     bpy.coat3D = dict()
     bpy.coat3D['active_coat'] = ''
@@ -276,6 +278,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     import bpy
 
     del bpy.types.Object.coat3D
diff --git a/io_coat3D/coat.py b/io_coat3D/coat.py
index 48a2c996e..fc989dd6c 100644
--- a/io_coat3D/coat.py
+++ b/io_coat3D/coat.py
@@ -519,9 +519,13 @@ class SCENE_OT_deltex(bpy.types.Operator):
         return('FINISHED')
 
 def register():
+    bpy.utils.register_module(__name__)
+
     pass
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
 
 if __name__ == "__main__":
diff --git a/io_convert_image_to_mesh_img/__init__.py b/io_convert_image_to_mesh_img/__init__.py
index f6e5f522b..290e97e9f 100644
--- a/io_convert_image_to_mesh_img/__init__.py
+++ b/io_convert_image_to_mesh_img/__init__.py
@@ -119,9 +119,13 @@ def menu_import(self, context):
     self.layout.operator(ImportHiRISEIMGDTM.bl_idname, text="HiRISE DTM from PDS IMG (*.IMG)")
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_import)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_import)
 
 if __name__ == "__main__":
diff --git a/io_export_directx_x.py b/io_export_directx_x.py
index 9bb5410ca..1cda63998 100644
--- a/io_export_directx_x.py
+++ b/io_export_directx_x.py
@@ -1225,10 +1225,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 
diff --git a/io_export_pc2.py b/io_export_pc2.py
index a8a468cbd..a739def84 100644
--- a/io_export_pc2.py
+++ b/io_export_pc2.py
@@ -188,10 +188,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_export.append(menu_func)
     #bpy.types.VIEW3D_PT_tools_objectmode.prepend(menu_func)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_export.remove(menu_func)
     #bpy.types.VIEW3D_PT_tools_objectmode.remove(menu_func)
     
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 14fcd9d18..b7b828794 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -1781,9 +1781,13 @@ def menu_func(self, context):
     self.layout.operator(ExportUDKAnimData.bl_idname, text="Skeleton Mesh / Animation Data (.psk/.psa)").filepath = default_path
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
diff --git a/io_import_gimp_image_to_scene.py b/io_import_gimp_image_to_scene.py
index de1f0686b..bf1ed44b6 100644
--- a/io_import_gimp_image_to_scene.py
+++ b/io_import_gimp_image_to_scene.py
@@ -659,10 +659,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index 3156d2939..558744756 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -340,8 +340,12 @@ def import_images_button(self, context):
     self.layout.operator(IMPORT_OT_image_to_plane.bl_idname, text="Images as Planes", icon='PLUGIN')
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(import_images_button)
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(import_images_button)
 if __name__ == '__main__':
     register()
diff --git a/io_import_scene_dxf.py b/io_import_scene_dxf.py
index 0f58cd59a..ce45ece41 100644
--- a/io_import_scene_dxf.py
+++ b/io_import_scene_dxf.py
@@ -2507,9 +2507,13 @@ def menu_func(self, context):
     self.layout.operator(IMPORT_OT_autocad_dxf.bl_idname, text="Autocad (.dxf)")
 
 def register():
+    bpy.utils.register_module(__name__)
+
      bpy.types.INFO_MT_file_import.append(menu_func)
  
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 if __name__ == "__main__":
diff --git a/io_import_scene_lwo.py b/io_import_scene_lwo.py
index 73eda0169..2181cf4b0 100644
--- a/io_import_scene_lwo.py
+++ b/io_import_scene_lwo.py
@@ -1244,10 +1244,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 if __name__ == "__main__":
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 3b7448463..c27fc3d1f 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -2452,9 +2452,13 @@ def menu_func(self, context):
     self.layout.operator(IMPORT_OT_makehuman_mhx.bl_idname, text="MakeHuman (.mhx)...")
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_func)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 if __name__ == "__main__":
diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py
index d6686fc27..a504bc3d7 100644
--- a/io_import_scene_unreal_psk.py
+++ b/io_import_scene_unreal_psk.py
@@ -602,9 +602,13 @@ def menu_func(self, context):
     self.layout.operator(IMPORT_OT_psk.bl_idname, text="Skeleton Mesh (.psk)")
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_func)
     
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 if __name__ == "__main__":
diff --git a/io_mesh_ply/__init__.py b/io_mesh_ply/__init__.py
index c653a778f..f889a0cc6 100644
--- a/io_mesh_ply/__init__.py
+++ b/io_mesh_ply/__init__.py
@@ -116,11 +116,15 @@ def menu_func_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     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__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func_import)
     bpy.types.INFO_MT_file_export.remove(menu_func_export)
 
diff --git a/io_mesh_raw/__init__.py b/io_mesh_raw/__init__.py
index 4c23d88ad..d5a0bd869 100644
--- a/io_mesh_raw/__init__.py
+++ b/io_mesh_raw/__init__.py
@@ -53,10 +53,14 @@ def menu_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_import)
     bpy.types.INFO_MT_file_export.append(menu_export)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_import)
     bpy.types.INFO_MT_file_export.remove(menu_export)
 
diff --git a/io_mesh_stl/__init__.py b/io_mesh_stl/__init__.py
index 8d5297fdf..d46e6036d 100644
--- a/io_mesh_stl/__init__.py
+++ b/io_mesh_stl/__init__.py
@@ -135,11 +135,15 @@ def menu_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_import)
     bpy.types.INFO_MT_file_export.append(menu_export)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_import)
     bpy.types.INFO_MT_file_export.remove(menu_export)
 
diff --git a/io_scene_3ds/__init__.py b/io_scene_3ds/__init__.py
index 54840921e..4840a9000 100644
--- a/io_scene_3ds/__init__.py
+++ b/io_scene_3ds/__init__.py
@@ -86,11 +86,15 @@ def menu_func_import(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     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__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func_import)
     bpy.types.INFO_MT_file_export.remove(menu_func_export)
 
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 3ac33162c..49f14a947 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -114,10 +114,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
diff --git a/io_scene_m3/__init__.py b/io_scene_m3/__init__.py
index 2b72b9d6e..a6cd763dd 100644
--- a/io_scene_m3/__init__.py
+++ b/io_scene_m3/__init__.py
@@ -63,11 +63,15 @@ def menu_import(self, context):
 #        text="Raw Faces (.raw)").filepath = default_path
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_file_import.append(menu_import)
 #    bpy.types.INFO_MT_file_export.append(menu_export)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_file_import.remove(menu_import)
 #    bpy.types.INFO_MT_file_export.remove(menu_export)
 
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index a7407870e..137c56d7d 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -124,11 +124,15 @@ def menu_func_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     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__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func_import)
     bpy.types.INFO_MT_file_export.remove(menu_func_export)
 
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py
index 565addd8d..b6ba16c8b 100644
--- a/io_scene_x3d/__init__.py
+++ b/io_scene_x3d/__init__.py
@@ -84,11 +84,15 @@ def menu_func_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     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__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func_import)
     bpy.types.INFO_MT_file_export.remove(menu_func_export)
 
diff --git a/io_shape_mdd/__init__.py b/io_shape_mdd/__init__.py
index 4dcb97e9c..f6e404a9b 100644
--- a/io_shape_mdd/__init__.py
+++ b/io_shape_mdd/__init__.py
@@ -120,11 +120,15 @@ def menu_func_export(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     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__)
+
     bpy.types.INFO_MT_file_import.remove(menu_func_import)
     bpy.types.INFO_MT_file_export.remove(menu_func_export)
 
diff --git a/mesh_relax.py b/mesh_relax.py
index a4823e4e1..c979c60fb 100644
--- a/mesh_relax.py
+++ b/mesh_relax.py
@@ -117,10 +117,14 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.VIEW3D_MT_edit_mesh_specials.append(menu_func)
     bpy.types.VIEW3D_MT_edit_mesh_vertices.append(menu_func)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_func)
     bpy.types.VIEW3D_MT_edit_mesh_vertices.remove(menu_func)
 
diff --git a/mesh_surface_sketch.py b/mesh_surface_sketch.py
index df6f9f7fe..cddf616bd 100644
--- a/mesh_surface_sketch.py
+++ b/mesh_surface_sketch.py
@@ -787,6 +787,8 @@ class GPENCIL_OT_surfsk_strokes_to_curves(bpy.types.Operator):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.Scene.SURFSK_edges_U = bpy.props.IntProperty(name="Cross", description="Number of edge rings crossing the strokes (perpendicular to strokes direction)", default=10, min=0, max=100000)
     bpy.types.Scene.SURFSK_edges_V = bpy.props.IntProperty(name="Follow", description="Number of edge rings following the strokes (parallel to strokes direction)", default=10, min=0, max=100000)
     bpy.types.Scene.SURFSK_precision = bpy.props.IntProperty(name="Precision", description="Precision level of the surface calculation", default=4, min=0, max=100000)
@@ -801,6 +803,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     del bpy.types.Scene.SURFSK_edges_U
     del bpy.types.Scene.SURFSK_edges_V
     del bpy.types.Scene.SURFSK_precision
diff --git a/object_add_chain.py b/object_add_chain.py
index bd6696e48..edc3278d1 100644
--- a/object_add_chain.py
+++ b/object_add_chain.py
@@ -143,11 +143,15 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     # Add "Chain" menu to the "Add Mesh" menu.
     bpy.types.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # Remove "Chain" menu from the "Add Mesh" menu.
     bpy.types.INFO_MT_mesh_add.remove(menu_func)
 
diff --git a/object_animrenderbake.py b/object_animrenderbake.py
index 05eb58777..e791cd131 100644
--- a/object_animrenderbake.py
+++ b/object_animrenderbake.py
@@ -158,6 +158,8 @@ def draw_animrenderbake(self, context):
     sub.prop(rd, "bake_bias")
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.Scene.animrenderbake_start = IntProperty(
         name="Start",
         description="Start frame of the animated bake",
@@ -174,6 +176,8 @@ def register():
     panel.draw = draw_animrenderbake
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # restore original panel draw function
     bpy.types.RENDER_PT_bake.draw = bpy.types.RENDER_PT_bake.old_draw
     del bpy.types.RENDER_PT_bake.old_draw
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index 2ff145226..d2ea30b65 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -721,6 +721,8 @@ class GenerateCloud(bpy.types.Operator):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.Scene.cloudparticles = BoolProperty(
         name="Particles",
         description="Generate Cloud as Particle System",
@@ -743,6 +745,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     del bpy.types.Scene.cloudparticles
     del bpy.types.Scene.cloud_type
 
diff --git a/object_fracture/__init__.py b/object_fracture/__init__.py
index b678724bc..3379d75fd 100644
--- a/object_fracture/__init__.py
+++ b/object_fracture/__init__.py
@@ -66,11 +66,15 @@ def menu_func(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     # Add the "add fracture objects" menu to the "Add" menu
     space_info.INFO_MT_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     # Remove "add fracture objects" menu from the "Add" menu.
     space_info.INFO_MT_add.remove(menu_func)
 
diff --git a/render_povray/__init__.py b/render_povray/__init__.py
index 46ae34c09..55a03b884 100644
--- a/render_povray/__init__.py
+++ b/render_povray/__init__.py
@@ -46,6 +46,8 @@ else:
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     Scene = bpy.types.Scene
 
     # File Options
@@ -403,6 +405,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     import bpy
     Scene = bpy.types.Scene
     Mat = bpy.types.Material
diff --git a/render_renderfarmfi.py b/render_renderfarmfi.py
index 5f32ae9d2..67abcc14f 100644
--- a/render_renderfarmfi.py
+++ b/render_renderfarmfi.py
@@ -957,9 +957,13 @@ def menu_export(self, context):
     self.layout.operator(RenderfarmFi.bl_idname, text=RenderfarmFi.bl_label)
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.INFO_MT_render.append(menu_export)
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     bpy.types.INFO_MT_render.remove(menu_export)
 
 if __name__ == "__main__":
diff --git a/rigify/__init__.py b/rigify/__init__.py
index 20821f9d3..cf0ed06a3 100644
--- a/rigify/__init__.py
+++ b/rigify/__init__.py
@@ -127,6 +127,8 @@ for rig in rig_list:
 ##### REGISTER #####
 
 def register():
+    bpy.utils.register_module(__name__)
+
     bpy.types.PoseBone.rigify_type = bpy.props.StringProperty(name="Rigify Type", description="Rig type for this bone.")
     bpy.types.PoseBone.rigify_parameters = bpy.props.CollectionProperty(type=RigifyParameters)
 
@@ -139,6 +141,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     del bpy.types.PoseBone.rigify_type
     del bpy.types.PoseBone.rigify_parameters
 
diff --git a/rigify/metarig_menu.py b/rigify/metarig_menu.py
index 65dbbce96..54fae2d5e 100644
--- a/rigify/metarig_menu.py
+++ b/rigify/metarig_menu.py
@@ -46,11 +46,15 @@ menu_func = (lambda self, context: self.layout.operator(AddHuman.bl_idname,
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     #bpy.types.register(AddHuman)
     bpy.types.INFO_MT_armature_add.append(menu_func)
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     #bpy.types.unregister(AddHuman)
     bpy.types.INFO_MT_armature_add.remove(menu_func)
 
diff --git a/rigify/ui.py b/rigify/ui.py
index a27d319bc..827b0fc20 100644
--- a/rigify/ui.py
+++ b/rigify/ui.py
@@ -233,6 +233,8 @@ class Sample(bpy.types.Operator):
 #import space_info  # ensure the menu is loaded first
 
 def register():
+    bpy.utils.register_module(__name__)
+
     #bpy.types.register(DATA_PT_rigify_buttons)
     #bpy.types.register(BONE_PT_rigify_buttons)
     #bpy.types.register(Generate)
@@ -243,6 +245,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     #bpy.types.unregister(DATA_PT_rigify_buttons)
     #bpy.types.unregister(BONE_PT_rigify_buttons)
     #bpy.types.unregister(Generate)
diff --git a/space_view3d_3d_navigation.py b/space_view3d_3d_navigation.py
index ea8347e54..bc6459ae6 100644
--- a/space_view3d_3d_navigation.py
+++ b/space_view3d_3d_navigation.py
@@ -87,10 +87,14 @@ class VIEW3D_PT_3dnavigationPanel(bpy.types.Panel):
         row.operator("view3d.snap_cursor_to_selected", text="Cursor to Selected")
 
 # register the class
-def register(): 
+def register():
+    bpy.utils.register_module(__name__)
+ 
     pass 
 
-def unregister(): 
+def unregister():
+    bpy.utils.unregister_module(__name__)
+ 
     pass 
 
 if __name__ == "__main__": 
diff --git a/space_view3d_align_tools.py b/space_view3d_align_tools.py
index 63fe0676d..6b805f1ef 100644
--- a/space_view3d_align_tools.py
+++ b/space_view3d_align_tools.py
@@ -329,9 +329,13 @@ class AlignScaleZOperator(bpy.types.Operator):
 
 ## registring
 def register():
+    bpy.utils.register_module(__name__)
+
     pass
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
 
 if __name__ == "__main__":
diff --git a/space_view3d_copy_attributes.py b/space_view3d_copy_attributes.py
index a3b39144c..ce30d55a2 100644
--- a/space_view3d_copy_attributes.py
+++ b/space_view3d_copy_attributes.py
@@ -729,6 +729,8 @@ def _add_tface_buttons(self, context):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     ''' mostly to get the keymap working '''
     kc = bpy.context.window_manager.keyconfigs['Blender']
     km = kc.keymaps.get("Object Mode")
@@ -758,6 +760,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     ''' mostly to remove the keymap '''
     kms = bpy.context.window_manager.keyconfigs['Blender'].keymaps['Pose']
     for item in kms.items:
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index 7923a4213..3f4d6ac55 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -673,11 +673,15 @@ class VIEW3D_MT_select_material(bpy.types.Menu):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View']
     kmi = km.items.new('wm.call_menu', 'Q', 'PRESS')
     kmi.properties.name = "VIEW3D_MT_master_material"
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View']
     for kmi in km.items:
         if kmi.idname == 'wm.call_menu':
diff --git a/space_view3d_math_vis/__init__.py b/space_view3d_math_vis/__init__.py
index 544454b88..02bbf3d9f 100644
--- a/space_view3d_math_vis/__init__.py
+++ b/space_view3d_math_vis/__init__.py
@@ -92,10 +92,14 @@ def console_hook():
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     import console_python
     console_python.execute.hooks.append((console_hook, ()))
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     import console_python
     console_python.execute.hooks.remove((console_hook, ()))
 
diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py
index 8fd007125..bff9a8dab 100644
--- a/space_view3d_panel_measure.py
+++ b/space_view3d_panel_measure.py
@@ -1100,10 +1100,14 @@ class VIEW3D_PT_measure(bpy.types.Panel):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     pass
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
 
 if __name__ == "__main__":
diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py
index 21949d956..0b300c431 100644
--- a/space_view3d_spacebar_menu.py
+++ b/space_view3d_spacebar_menu.py
@@ -1499,12 +1499,16 @@ class VIEW3D_MT_undoS(bpy.types.Menu):
         layout.operator("ed.redo", icon='TRIA_RIGHT')
 
 def register():
+    bpy.utils.register_module(__name__)
+
     km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View']
     kmi = km.items.new('wm.call_menu', 'SPACE', 'PRESS')
     kmi.properties.name = "VIEW3D_MT_Space_Dynamic_Menu"
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     km = bpy.context.window_manager.keyconfigs.default.keymaps['3D View']
     for kmi in km.items:
         if kmi.idname == 'wm.call_menu':
diff --git a/system_blend_info.py b/system_blend_info.py
index a1885ec1b..ecaaee83a 100644
--- a/system_blend_info.py
+++ b/system_blend_info.py
@@ -198,9 +198,13 @@ class OBJECT_PT_blendinfo(bpy.types.Panel):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     pass
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     pass
 
 if __name__ == "__main__":
diff --git a/system_property_chart.py b/system_property_chart.py
index 8917d413f..61d0b2c67 100644
--- a/system_property_chart.py
+++ b/system_property_chart.py
@@ -219,6 +219,8 @@ class CopyPropertyChart(bpy.types.Operator):
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     Scene = bpy.types.Scene
 
     for cls in View3DEditProps, SequencerEditProps:
@@ -232,6 +234,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     Scene = bpy.types.Scene
 
     for cls in View3DEditProps, SequencerEditProps:
diff --git a/text_editor_api_navigator.py b/text_editor_api_navigator.py
index 8cf8bfd50..fa82d54b8 100644
--- a/text_editor_api_navigator.py
+++ b/text_editor_api_navigator.py
@@ -700,6 +700,8 @@ def unregister_keymaps():
 
 
 def register():
+    bpy.utils.register_module(__name__)
+
     class ApiNavProps(bpy.types.IDPropertyGroup):
         """
         Fake module like class.
@@ -716,6 +718,8 @@ def register():
 
 
 def unregister():
+    bpy.utils.unregister_module(__name__)
+
     unregister_keymaps()
     delProperties()
     
-- 
GitLab