I am trying to use the Python interface to load in a .fbx file in an automated manner, essentially trying to replace the ‘File → Import into Level → …’ process. Currently I am trying:
importInfo = unreal.AutomatedAssetImportData()
importInfo.destination_path = ‘/Game/Meshes/Building/pythonTest1/’
importInfo.factory = unreal.FbxSceneImportFactory()
importInfo.filenames = [fbxFilePath, ] # This is the file path to the .fbx file
importInfo.level_to_load = ‘temp’
importInfo.group_name = ‘tmp’
fbxScene = unreal.AssetTools.import_assets_automated(importInfo)
But this throws the error:
TypeError: descriptor ‘import_assets_automated’ requires a ‘AssetTools’ object but received a ‘AutomatedAssetImportData’
The API suggests that it should be passed an AutomatedAssetImportData (https://api.unrealengine.com/INT/PythonAPI/class/AssetTools.html) but this doesn’t work. Am I missing something or is this a bug?
Thanks in advance for your help.