Announcement

Collapse
No announcement yet.

import alembic (fbx) with python api

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    import alembic (fbx) with python api

    Hello,

    I'm currently working on import alembic and fbx files into unreal engine with python API.
    but here's some problem that I add some options like frame information, etc, but it's not working at all.

    When importing, engine are using last import option with UI.

    Here is my code, this is for alembic but importing fbx also has same problems.

    Code:
    def importAlembic():
    
        task = unreal.AssetImportTask()
    
        auto = True
        destination_name = ''
        destination_path = '/Game/test'
        filename = 'D:/test_alembic_r001.abc'
        task.set_editor_property('automated', auto )
        task.set_editor_property('destination_name', destination_name)
        task.set_editor_property('destination_path', destination_path)
        task.set_editor_property('filename', filename)
        task.set_editor_property('replace_existing', True)
        task.set_editor_property('save', True)
    
        task.options = unreal.AbcImportSettings()
        task.options.import_type = unreal.AlembicImportType.SKELETAL
        task.options.compression_settings.merge_meshes = True     
        task.options.material_settings.find_materials = True
        task.options.sampling_settings.frame_start = 101
        task.options.sampling_settings.frame_end = 110
        unreal.AssetToolsHelpers.get_asset_tools().import_asset_tasks([task])

    Am I missing something? Is there anyone have same problem??
    I'm the new on Unreal Engine, please help me.

    Thanks in advance for your help.

    Cheers.





Working...
X