FBX: Use layout panels instead of PanelTypes #105238
@ -40,6 +40,7 @@ from bpy_extras.io_utils import (
|
|||||||
orientation_helper,
|
orientation_helper,
|
||||||
path_reference_mode,
|
path_reference_mode,
|
||||||
axis_conversion,
|
axis_conversion,
|
||||||
|
poll_file_object_drop,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -220,6 +221,8 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
|
|||||||
else:
|
else:
|
||||||
return import_fbx.load(self, context, filepath=self.filepath, **keywords)
|
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):
|
def import_panel_include(layout, operator):
|
||||||
header, body = layout.panel("FBX_import_include", default_closed=False)
|
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")
|
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):
|
def menu_func_import(self, context):
|
||||||
self.layout.operator(ImportFBX.bl_idname, text="FBX (.fbx)")
|
self.layout.operator(ImportFBX.bl_idname, text="FBX (.fbx)")
|
||||||
|
|
||||||
@ -687,6 +701,7 @@ def menu_func_export(self, context):
|
|||||||
classes = (
|
classes = (
|
||||||
ImportFBX,
|
ImportFBX,
|
||||||
ExportFBX,
|
ExportFBX,
|
||||||
|
IO_FH_fbx,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user