Via the Python API, how can I do the equivalent to:
static mesh “right click” > “Convert to Skeletal Mesh” > (set options) > Convert
(step 2 in the “Creating a Skeletal mesh” section here)
I came across the InterchangePipelineMeshesUtilitiesContext docs, but I am not sure if I am heading in the right direction. Any guidance/snippets will be really appreciated!
import os
import sys
import unreal
import_file = os.path.normpath('pathToYourFile')
import_directory = 'PathToContentFolder'
#for example /Game/ImportFolder
import_asset_parameters = unreal.ImportAssetParameters()
# To import without import dialog popping:
import_asset_parameters.is_automated = True
interchange_manager = unreal.InterchangeManager.get_interchange_manager_scripted()
source_data = interchange_manager.create_source_data(import_file)
# Create pipeline in case you don't have your own yet.
assets_pipeline = unreal.InterchangeGenericAssetsPipeline()
# Force all Mesh types to be SkeletalMeshes:
assets_pipeline.common_meshes_properties.force_all_mesh_as_type = unreal.InterchangeForceMeshType.IFMT_SKELETAL_MESH
# To use the created pipeline with the force all mesh setting:
import_asset_parameters.override_pipelines.append(unreal.SoftObjectPath(assets_pipeline.get_path_name()))
interchange_manager.import_asset(import_directory,source_data,import_asset_parameters)