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.
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
| Name | Description |
|---|---|
| create | Create an empty builder. |
| add_actor_scene | Add a scene that exports the static mesh components of saved actors. |
| add_actor_scene_from_world_partition_actors | Add an actor scene from World Partition actors without loading them. |
| add_static_mesh_scene | Add a scene that exports a static mesh asset. |
| remove_scene | Remove a scene. |
| get_scene_names | Get the scene names in manifest order. |
| add_landscape_clipping | Add landscape clipping geometry inside the bounds of an actor scene. |
| add_landscape_geometry_append | Add landscape geometry with explicit settings. |
| add_scene_capture | Add a scene capture with explicit settings. |
| add_splatter_caster_capture | Add a scene capture set up for a splatter caster. |
| validate | Validate the manifest without saving it. |
| save_to_file | Validate and save the manifest. |
| load_from_file | Load a manifest into a new builder. |
| get_manifest_world_partition_actors | List the actors of a World Partition world without loading them. |
| get_last_error_message | Get the error of the last failed call on the builder. |
Method details
create
@classmethod
def create() -> SimplygonSceneExportManifestBuilderCreates an empty builder.
add_actor_scene
def add_actor_scene(scene_name: str, output_file: str, actors: Array[Actor], export_settings: SgSceneExportSettings) -> boolAdds 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
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) -> boolAdds an actor scene from actors listed with get_manifest_world_partition_actors, without loading them.
add_static_mesh_scene
def add_static_mesh_scene(scene_name: str, output_file: str, static_mesh: StaticMesh, export_settings: SgSceneMeshExportSettings) -> boolAdds a scene that exports a saved static mesh asset.
remove_scene
def remove_scene(scene_name: str) -> boolRemoves a scene with its geometry appends and scene captures.
get_scene_names
def get_scene_names() -> Array[str]Returns the scene names in manifest order.
add_landscape_clipping
def add_landscape_clipping(
scene_name: str,
precision: LandscapeCullingPrecision = LandscapeCullingPrecision.MEDIUM,
allow_empty: bool = False) -> boolAdds 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
def add_landscape_geometry_append(
scene_name: str,
append_name: str,
landscape_settings: SgLandscapeGeometryExportSettings,
append_settings: SgAppendSceneGeometrySettings,
allow_empty: bool = False) -> boolAdds landscape geometry to an actor scene using the settings as-is.
add_scene_capture
def add_scene_capture(
scene_name: str,
capture_name: str,
camera_generation_settings: SCOBBCameraGenerationSettings,
capture_settings: SgCaptureComponentsToSceneSettings,
capture_world: SgSceneExportManifestCaptureWorld = SgSceneExportManifestCaptureWorld.PREVIEW) -> boolAdds 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
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) -> boolAdds 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
def validate() -> boolValidates the manifest in the same way as save_to_file, without writing it.
save_to_file
def save_to_file(file_path: str) -> boolValidates the manifest and writes it to a JSON file atomically.
load_from_file
@classmethod
def load_from_file(file_path: str) -> Optional[SimplygonSceneExportManifestBuilder]Loads a manifest file into a new builder.
get_manifest_world_partition_actors
@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
def get_last_error_message() -> strReturns the error message of the last failed call on this builder, or an empty string when the last call succeeded.
