FBX: Use layout panels instead of PanelTypes #105238

Merged
Jesse Yurkovich merged 3 commits from deadpin/blender-addons:panels-fbx into main 2024-04-04 20:52:53 +02:00
Showing only changes of commit f7c61b936a - Show all commits

View File

@ -40,6 +40,7 @@ from bpy_extras.io_utils import (
orientation_helper,
path_reference_mode,
axis_conversion,
poll_file_object_drop,
)
@ -220,6 +221,8 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
else:
return import_fbx.load(self, context, filepath=self.filepath, **keywords)
def invoke(self, context, event):
return self.invoke_popup(context)
def import_panel_include(layout, operator):
header, body = layout.panel("FBX_import_include", default_closed=False)
@ -676,6 +679,17 @@ def export_panel_animation(layout, operator):
body.prop(operator, "bake_anim_simplify_factor")
class IO_FH_fbx(bpy.types.FileHandler):
bl_idname = "IO_FH_fbx"
bl_label = "FBX"
bl_import_operator = "import_scene.fbx"
bl_file_extensions = ".fbx"
@classmethod
def poll_drop(cls, context):
return poll_file_object_drop(context)
def menu_func_import(self, context):
self.layout.operator(ImportFBX.bl_idname, text="FBX (.fbx)")
@ -687,6 +701,7 @@ def menu_func_export(self, context):
classes = (
ImportFBX,
ExportFBX,
IO_FH_fbx,
)