How can I automatically proceed with Fbx import without a dialog box?

I have a large amount of files (Texture, obj, mtl). And I want to import these. However, when you perform an import, the Fbx import option dialog box appears for each file. After modifying the option, I want to apply the same option to all subsequent files without displaying additional dialogs. What should I do?

저는 많은 양의 파일을 가지고 있습니다. 그리고 이것들을 Import 하고 싶습니다. 그러나 가져오기를 수행하면 각 파일에 대해 Fbx Import 욥션 대화 상자가 나타납니다. 옵션을 수정한 후에는 추가 대화 상자를 표시하지 않고 이후의 모든 파일에 동일한 옵션을 적용하고 싶습니다. 어떻게 해야 하나요?

You can use asset import tasks in python to automate this.
https://docs.unrealengine.com/4.27/en-US/PythonAPI/class/AssetImportTask.html

For importing a texture with no prompt:

def import_new_texture(new_texture_filename, texture_name, texture_unreal_path):
    import_task = unreal.AssetImportTask()
    import_task.destination_name = texture_name
    import_task.destination_path = texture_unreal_path
    import_task.filename = new_texture_filename
    import_task.automated = True
    import_task.replace_existing = True
    import_task.save = True

    unreal.AssetToolsHelpers.get_asset_tools().import_asset_tasks([import_task])

If you need to import objects, look into the FBXImportUI and AbcImportSettings
You set them on the import task with:
import_task.set_editor_property("options", fbx_options_object)

2 Likes