Announcement

Collapse
No announcement yet.

importing skeletal meshes 4.21 ?

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

  • started a topic importing skeletal meshes 4.21 ?

    importing skeletal meshes 4.21 ?

    I used to be able to import skeletal meshes with options setup like this:

    Code:
        
    options = unreal.FbxImportUI()
    
    options.import_mesh = True
    options.import_as_skeletal = True
    
    options.import_materials = False
    options.import_textures = False
    
    options.create_physics_asset = physic
    options.import_animations = False
    
    options.mesh_type_to_import = unreal.FBXImportType.FBXIT_SKELETAL_MESH
    But suddenly it doesnt work anymore and comes in as a static mesh instead as if the import_as_skeletal toggle is getting ignored.

    And since I havent used my script since 4.20 i was wondering if something perhaps happened between 4.20 and 4.21.


  • replied
    Hey Alex thanks for your answer, however this is what solved it for me. Turning of "should detect type".

    Code:
    options.automated_import_should_detect_type = False

    Leave a comment:


  • replied
    Hello,

    I don't know if it's the cause, but I think it's recommended to use the 'set_editor_property' function instead of setting it directly into the variable.


    Here is my code and it's working in 2.21

    Code:
    options = unreal.FbxImportUI()
    options.set_editor_property('import_mesh', True)
    options.set_editor_property('import_textures', True)
    options.set_editor_property('import_materials', True)
    options.set_editor_property('import_as_skeletal', True)
    
    task = unreal.AssetImportTask()
    task.set_editor_property('automated', True)
    task.set_editor_property('destination_path', '/Game/SkeletalMeshes')
    task.set_editor_property('filename', 'C:/Path/To/SK_TutorialTPP.FBX')
    task.set_editor_property('replace_existing', True)
    task.set_editor_property('save', True)
    task.set_editor_property('options', options)
    
    unreal.AssetToolsHelpers.get_asset_tools().import_asset_tasks([task])

    And here is a video I did on this:
    https://youtu.be/SEjOZJ-IHro

    Leave a comment:

Working...
X