This commit is contained in:
2022-02-25 20:05:46 -06:00
parent 82c3828c31
commit 04cb56ef0a
2 changed files with 7 additions and 6 deletions
+7 -2
View File
@@ -10,10 +10,15 @@ bl_info = {
import bpy
import importlib
from .importldd import ImportLDDOps
module_names = ("process_model", "bake_lighting", "remove_hidden_faces")
modules = []
# Only needed if you want to add into a dynamic menu
def menu_func_import(self, context):
self.layout.operator(ImportLDDOps.bl_idname, text="LEGO Digital Designer (.lxf/.lxfml)")
for module_name in module_names:
if module_name in locals():
modules.append(importlib.reload(locals()[module_name]))
@@ -24,10 +29,10 @@ def register():
for module in modules:
module.register()
bpy.utils.register_class(ImportLDDOps)
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
bpy.types.TOPBAR_MT_file_import.append(menu_func_import)
def unregister():
for module in modules:
module.unregister()
bpy.utils.unregister_class(ImportLDDOps)
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)