ImportAssets Commandlet for Animation Sequence

Hello,

I’m currently researching commandlets to import animation sequences. I could use that to re-import a lot of animation overnight. As a batch process.

I have tried this for static meshes:

{ “ImportGroups”: { “FileNames”: “path/to/fbx/file/test.fbx” ], “bReplaceExisting”: “true”, “DestinationPath”: “/Game/Geometry/Test/”, “FactoryName”: “FbxFactory”, “ImportSettings”: { “bImportMesh”: 1, “bConvertSceneUnit”: 1, “bConvertScene”: 1, “bCombineMeshes”: 0, “bImportTextures”: 0, “bImportMaterials”: 0, “AnimSequenceImportData”: { “bImportMeshesInBoneHierarchy”: 1, “bDeleteExistingMorphTargetCurves”: 1 }, “SkeletalMeshImportData”: {}, “TextureImportData”: {}, “StaticMeshImportData”: { “bRemoveDegenerates”: 1, “bAutoGenerateCollision”: 1 } } } ] } Works great for static meshes, but when I change “FbxFactory” to “AnimSequenceFactory” and try an animation sequence fbx it fails. I can’t find any documentation about this. So all the help is welcome! Is there no way to just call a re-import on an existing asset? I could also research the “auto reimport” feature. Thanks! note: changed the path in my log.

  1. [2018.03.18-01.16.05:494] 0]LogAutomatedImport: Importing group AutomatedAssetImportData_1
  2. [2018.03.18-01.16.05:500] 0]LogFactory: FactoryCreateFile: StaticMesh with FbxFactory (0 0 //test//test_animation.fbx)
  3. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: GlobalSettings, ItemCount : 1
  4. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: AnimationStack, ItemCount : 1
  5. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: AnimationLayer, ItemCount : 1
  6. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: NodeAttribute, ItemCount : 195
  7. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: Model, ItemCount : 197
  8. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: Geometry, ItemCount : 2
  9. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: AnimationCurveNode, ItemCount : 734
  10. [2018.03.18-01.16.05:510] 0]LogFbx: ItemName: AnimationCurve, ItemCount : 940
  11. [2018.03.18-01.16.05:513] 0]LogFbx: Loading FBX Scene from path//test_animation.fbx
  12. [2018.03.18-01.16.05:600] 0]LogFbx: FBX Scene Loaded Succesfully
  13. [2018.03.18-01.16.05:613] 0]LogFbx: Loading FBX Scene from path//scenes//test//test_animation.fbx
  14. [2018.03.18-01.16.05:692] 0]LogFbx: FBX Scene Loaded Succesfully
  15. [2018.03.18-01.16.05:709] 0]FBXImport: Warning: Mesh [Geometry have no name] in the fbx file is not reference by any hierarchy node.
  16. [2018.03.18-01.16.05:710] 0]FBXImport: Warning: Mesh [Geometry have no name] in the fbx file is not reference by any hierarchy node.
  17. [2018.03.18-01.16.05:710] 0]FBXImport: Error: Import failed.
  18. [2018.03.18-01.16.05:711] 0]LogAssetTools: Warning: Failed to import ‘path//scenes//test//test_animation.fbx’. Failed to create asset ‘/Game/Geometry/Test/test_animation’.
  19. Please see Output Log for details.
  20. [2018.03.18-01.16.05:711] 0]LogAutomatedImport: Error: Failed to import all assets in group AutomatedAssetImportData_1
  21. [2018.03.18-01.16.05:711] 0]LogAutomatedImport: Error: Could not import all groups
  22. [2018.03.18-01.16.05:711] 0]LogInit: Display:
  23. [2018.03.18-01.16.05:711] 0]LogInit: Display: Warning/Error Summary (Unique only)
  24. [2018.03.18-01.16.05:711] 0]LogInit: Display: -----------------------------------
  25. [2018.03.18-01.16.05:712] 0]LogInit: Display: FBXImport: Error: Import failed.
  26. [2018.03.18-01.16.05:712] 0]LogInit: Display: LogAutomatedImport: Error: Failed to import all assets in group AutomatedAssetImportData_1
  27. [2018.03.18-01.16.05:712] 0]LogInit: Display: LogAutomatedImport: Error: Could not import all groups
  28. [2018.03.18-01.16.05:712] 0]LogInit: Display: FBXImport: Warning: Mesh [Geometry have no name] in the fbx file is not reference by any hierarchy node.
  29. [2018.03.18-01.16.05:712] 0]LogInit: Display: LogAssetTools: Warning: Failed to import path//scenes//test//test_animation.fbx’. Failed to create asset ‘/Game/Geometry/Test/test_animation’.
  30. Please see Output Log for details.
  31. [2018.03.18-01.16.05:712] 0]LogInit: Display:
  32. [2018.03.18-01.16.05:712] 0]LogInit: Display: Failure - 3 error(s), 3 warning(s)
  33. [2018.03.18-01.16.05:713] 0]LogInit: Display:

Was able to do the same thing using the re-import feature by temporary overriding the project config file for one workstation using a bat script. Probably safer as well. Still interested to find a commandline solution for this. Will dig deeper by looking at https://github.com/EpicGames/UnrealEngine/blob/8e4560b8c22b309e73ff0ce90377742c3dfe13cc/Engine/Source/Editor/UnrealEd/Private/Fbx/FbxFactory.cpp