Skip to content

Scene Export Manifest Builder for Python ​

unreal.SimplygonSceneExportManifestBuilder builds a scene export manifest. The scene export commandlet later uses the manifest to export Simplygon scenes in a separate process. See the C++ reference for details about each function.

Functions are synchronous. On failure they raise a RuntimeError with the reason, and the builder also stores the reason for get_last_error_message(). Every successful add keeps the manifest valid.

python
manifest = unreal.SimplygonSceneExportManifestBuilder.create()
manifest.add_actor_scene("SelectedActors", output_file, selected_actors, export_settings)
manifest.add_landscape_clipping("SelectedActors", unreal.LandscapeCullingPrecision.MEDIUM, allow_empty=True)
manifest.save_to_file(manifest_file_path)

See Python Examples for complete examples.

Methods ​

NameDescription
createCreate an empty builder.
add_actor_sceneAdd a scene that exports the static mesh components of saved actors.
add_actor_scene_from_world_partition_actorsAdd an actor scene from World Partition actors without loading them.
add_static_mesh_sceneAdd a scene that exports a static mesh asset.
remove_sceneRemove a scene.
get_scene_namesGet the scene names in manifest order.
add_landscape_clippingAdd landscape clipping geometry inside the bounds of an actor scene.
add_landscape_geometry_appendAdd landscape geometry with explicit settings.
add_scene_captureAdd a scene capture with explicit settings.
add_splatter_caster_captureAdd a scene capture set up for a splatter caster.
validateValidate the manifest without saving it.
save_to_fileValidate and save the manifest.
load_from_fileLoad a manifest into a new builder.
get_manifest_world_partition_actorsList the actors of a World Partition world without loading them.
get_last_error_messageGet the error of the last failed call on the builder.

Method details ​

create ​

python
@classmethod
def create() -> SimplygonSceneExportManifestBuilder

Creates an empty builder.

add_actor_scene ​

python
def add_actor_scene(scene_name: str, output_file: str, actors: Array[Actor], export_settings: SgSceneExportSettings) -> bool

Adds a scene that exports the static mesh components of saved actors in one editor world. output_file is stored as an absolute path; relative paths are relative to the process base directory, like the ones from unreal.Paths.

add_actor_scene_from_world_partition_actors ​

python
def add_actor_scene_from_world_partition_actors(
    scene_name: str,
    output_file: str,
    world: World,
    manifest_world_partition_actors: Array[SgSceneExportManifestWorldPartitionActor],
    export_settings: SgSceneExportSettings) -> bool

Adds an actor scene from actors listed with get_manifest_world_partition_actors, without loading them.

add_static_mesh_scene ​

python
def add_static_mesh_scene(scene_name: str, output_file: str, static_mesh: StaticMesh, export_settings: SgSceneMeshExportSettings) -> bool

Adds a scene that exports a saved static mesh asset.

remove_scene ​

python
def remove_scene(scene_name: str) -> bool

Removes a scene with its geometry appends and scene captures.

get_scene_names ​

python
def get_scene_names() -> Array[str]

Returns the scene names in manifest order.

add_landscape_clipping ​

python
def add_landscape_clipping(
    scene_name: str,
    precision: LandscapeCullingPrecision = LandscapeCullingPrecision.MEDIUM,
    allow_empty: bool = False) -> bool

Adds the landscape inside the bounds of an actor scene added on this builder to the clipping geometry selection set. When allow_empty is False, the export fails if no landscape intersects the bounds.

add_landscape_geometry_append ​

python
def add_landscape_geometry_append(
    scene_name: str,
    append_name: str,
    landscape_settings: SgLandscapeGeometryExportSettings,
    append_settings: SgAppendSceneGeometrySettings,
    allow_empty: bool = False) -> bool

Adds landscape geometry to an actor scene using the settings as-is.

add_scene_capture ​

python
def add_scene_capture(
    scene_name: str,
    capture_name: str,
    camera_generation_settings: SCOBBCameraGenerationSettings,
    capture_settings: SgCaptureComponentsToSceneSettings,
    capture_world: SgSceneExportManifestCaptureWorld = SgSceneExportManifestCaptureWorld.PREVIEW) -> bool

Adds a scene capture to an actor scene using the settings as-is. capture_world selects PREVIEW to capture preview copies of the components in an isolated preview world, or EXISTING to capture the components in their own world without duplicating them.

add_splatter_caster_capture ​

python
def add_splatter_caster_capture(
    scene_name: str,
    view_distance: float = 100.0,
    capture_resolution: int = 1024,
    max_camera_count: int = 128,
    buffer_types: int = 129,
    capture_world: SgSceneExportManifestCaptureWorld = SgSceneExportManifestCaptureWorld.PREVIEW) -> bool

Adds a scene capture for a splatter caster to an actor scene. view_distance is the expected viewing distance in world units (centimeters). buffer_types is a bitmask of SgBufferCaptureType channels; the default is base color and world normal. capture_world is the same as for add_scene_capture.

validate ​

python
def validate() -> bool

Validates the manifest in the same way as save_to_file, without writing it.

save_to_file ​

python
def save_to_file(file_path: str) -> bool

Validates the manifest and writes it to a JSON file atomically.

load_from_file ​

python
@classmethod
def load_from_file(file_path: str) -> Optional[SimplygonSceneExportManifestBuilder]

Loads a manifest file into a new builder.

get_manifest_world_partition_actors ​

python
@classmethod
def get_manifest_world_partition_actors(
    world: World,
    filter: SgSceneExportManifestWorldPartitionActorFilter) -> Optional[Array[SgSceneExportManifestWorldPartitionActor]]

Lists the actors of a World Partition world from World Partition's saved actor descriptors, without loading any actors. The default filter skips HLOD actors, editor-only actors, Level Instance actors (the actors inside them are listed instead), and landscapes. Each actor has its saved editor_bounds. Save the world first, since unsaved changes aren't in the descriptors.

get_last_error_message ​

python
def get_last_error_message() -> str

Returns the error message of the last failed call on this builder, or an empty string when the last call succeeded.