Totila
(Totila_)
December 7, 2018, 8:59am
14
AlexQuevillon:
For now, I’m able to call the function with this code:
import unreal
data = unreal.AutomatedAssetImportData()
data.set_editor_property('destination_path', '/Game/MyNewFolder')
data.set_editor_property('filenames', 'C:/Assets/SM_ColorCalibrator.FBX'])
data.set_editor_property('level_to_load', '/Game/MyNewLevel')
data.set_editor_property('replace_existing', True)
factory = unreal.FbxSceneImportFactory()
data.set_editor_property('factory', factory)
unreal.AssetToolsHelpers.get_asset_tools().import_assets_automated(data)
But I’m not able to prevent Unreal from showing the pop-up asking for the import settings.
It does not seem to have a way to avoid GetFbxSceneImportOptions() from UFbxSceneImportFactory
That’s some progress right there. I tested and can confirm your findings. Unfortunately, when I run the code again, the replace_existing flag doesnt seem to have an effect resulting in duplicated static meshes as well the blue print class.