What’s the best way to convert selected actors to static mesh in python?
I basically want to replicate (or call if it’s possible) this command on the selected actor:
That’s how far I’ve got:
mso = unreal.EditorScriptingMergeStaticMeshActorsOptions(
destroy_source_actors=False,
new_actor_label='my_test',
rename_components_from_source=True,
spawn_merged_actor=False,
base_package_name='/Game/TerrainTools/',
mesh_merging_settings=[256, [[1024, 1024], 4.0, 0.0, 0.5, 0.0, 0.5, 1.0, 1.0, 1.0, unreal.TextureSizingType.TEXTURE_SIZING_TYPE_USE_SINGLE_TEXTURE_SIZE, unreal.BlendMode.BLEND_OPAQUE, True, True, False, False, False, False, False, False, False, False, False, [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024], [1024, 1024]], 0, unreal.MeshLODSelectionType.CALCULATE_LOD, True, False, False, False, False, False, False, True, False, False, True])
x = unreal.EditorLevelLibrary.get_selected_level_actors()[0]
comps = x.get_components_by_class(unreal.StaticMeshComponent.static_class())
unreal.EditorLevelLibrary.merge_static_mesh_actors(comps, mso)
But unforunately getting this error:
LogEditorScripting: Error: MergeStaticMeshActors failed.
**I appreciate any help, guidance or direction. **
Thank you!