2023-10-18 21:23:04 +08:00
|
|
|
import bpy
|
2025-01-08 20:20:10 +08:00
|
|
|
from . import PROP_preferences, UTIL_functions, UTIL_file_browser, UTIL_blender_mesh, UTIL_ioport_shared
|
2023-10-18 21:23:04 +08:00
|
|
|
|
2024-01-01 13:07:10 +08:00
|
|
|
class BBP_OT_import_bmfile(bpy.types.Operator, UTIL_file_browser.ImportBmxFile, UTIL_ioport_shared.ImportParams):
|
2023-10-18 21:23:04 +08:00
|
|
|
"""Load a Ballance Map File (BM File Spec 1.4)"""
|
|
|
|
bl_idname = "bbp.import_bmfile"
|
|
|
|
bl_label = "Import BM (Ballance Map) File"
|
|
|
|
bl_options = {'PRESET', 'UNDO'}
|
2025-01-11 21:36:11 +08:00
|
|
|
bl_translation_context = 'BBP_OT_import_bmfile'
|
2023-11-09 17:20:57 +08:00
|
|
|
|
2023-10-18 21:23:04 +08:00
|
|
|
@classmethod
|
2025-01-03 09:36:32 +08:00
|
|
|
def poll(cls, context):
|
2023-10-18 21:23:04 +08:00
|
|
|
return PROP_preferences.get_raw_preferences().has_valid_blc_tex_folder()
|
|
|
|
|
|
|
|
def execute(self, context):
|
2025-01-11 21:36:11 +08:00
|
|
|
self.report({'ERROR'}, 'This feature is not supported yet.')
|
2025-01-08 20:20:10 +08:00
|
|
|
# self.report({'INFO'}, "BM File Importing Finished.")
|
2023-10-18 21:23:04 +08:00
|
|
|
return {'FINISHED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2024-01-01 13:07:10 +08:00
|
|
|
self.draw_import_params(layout.box())
|
2023-10-18 21:23:04 +08:00
|
|
|
|
|
|
|
def register() -> None:
|
|
|
|
bpy.utils.register_class(BBP_OT_import_bmfile)
|
|
|
|
|
|
|
|
def unregister() -> None:
|
|
|
|
bpy.utils.unregister_class(BBP_OT_import_bmfile)
|