Bootstrap Chameleon Logo

PythonLandscapeLib

Function Name Description
create_landscape Create A Landscape in Editor.
create_landscape_proxy Create A StreamingProxy in Editor.
create_landscape_proxy_with_guid Create A StreamingProxy in Editor.
add_adjacent_landscape_proxy Add A Neighbor StreamingProxy in specified direction
get_landscape_guid Get the guid from landscape
get_landscape_components Get the Components from landscape
set_heightmap_data Set height data for specified Landscape
get_heightmap_data Get height data for specified Landscape
cal_landscape_size Calculate the Size of Landscape (the size of heightmap data).
landscape_get_grass_components Get the HISM component for drawing GrassType.
landscape_flush_grass_components Flush the grass cache of landscape.
landscape_update_grass Update the grass cache of landscape proxy.

create_landscape

Create A Landscape in Editor.

unreal.PythonLandscapeLib.create_landscape(landscape_transform, section_size, sections_per_component, component_count_x, component_count_y) -> Landscape
    Create A Landscape in Editor.

    Args:
        landscape_transform (Transform): The transform of landscape.
        section_size (int32): The Section Size of the landscape. (63, 127, 255 and so on.)
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): Number of components in Axis X
        component_count_y (int32): Number of components in Axis Y

    Returns:
        Landscape: The created Landscape.

create_landscape_proxy

Create A StreamingProxy in Editor.

unreal.PythonLandscapeLib.create_landscape_proxy(landscape_transform, section_size, sections_per_component, component_count_x, component_count_y, shared_landscape_actor) -> LandscapeStreamingProxy
    Create A StreamingProxy in Editor.
    note: Haven't test in UE5 yet.

    Args:
        landscape_transform (Transform): The transform of landscape.
        section_size (int32): The Section Size of the landscape. (63, 127, 255 and so on.)
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): Number of components in Axis X
        component_count_y (int32): Number of components in Axis Y
        shared_landscape_actor (Landscape): The shared landscape witch share the GUID with the proxy

    Returns:
        LandscapeStreamingProxy: The created LandscapeStreamingProxy.

create_landscape_proxy_with_guid

Create A StreamingProxy in Editor.

unreal.PythonLandscapeLib.create_landscape_proxy_with_guid(landscape_transform, section_size, sections_per_component, component_count_x, component_count_y, guid, quads_space_offset_x=-1, quads_space_offset_y=-1) -> LandscapeStreamingProxy
    Create A StreamingProxy in Editor.
    note: Haven't test in UE5 yet.

    Args:
        landscape_transform (Transform): The transform of landscape.
        section_size (int32): The Section Size of the landscape. (63, 127, 255 and so on.)
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): Number of components in Axis X
        component_count_y (int32): Number of components in Axis Y
        guid (Guid): The GUID with the proxy
        quads_space_offset_x (int32):
        quads_space_offset_y (int32):

    Returns:
        LandscapeStreamingProxy: The created LandscapeStreamingProxy.

add_adjacent_landscape_proxy

Add A Neighbor StreamingProxy in specified direction

unreal.PythonLandscapeLib.add_adjacent_landscape_proxy(world_in, source_landscape, direction) -> LandscapeStreamingProxy
    East:0 South:1 West:2 North:3

    Args:
        world_in (World):
        source_landscape (LandscapeProxy):
        direction (int32):

    Returns:
        LandscapeStreamingProxy:

get_landscape_guid

Get the guid from landscape

unreal.PythonLandscapeLib.get_landscape_guid(landscape_proxy) -> Guid
    Get the guid from landscape

    Args:
        landscape_proxy (LandscapeProxy): The landscape instance.

    Returns:
        Guid: The Guid of the landscape.

get_landscape_components

Get the Components from landscape

unreal.PythonLandscapeLib.get_landscape_components(landscape_proxy) -> Array[LandscapeComponent]
    Get the Components from landscape

    Args:
        landscape_proxy (LandscapeProxy): The landscape instance.

    Returns:
        Array[LandscapeComponent]: The Components of the landscape.

set_heightmap_data

Set height data for specified Landscape

unreal.PythonLandscapeLib.set_heightmap_data(landscape, height_data) -> bool
    Set height data for specified Landscape

    Args:
        landscape (LandscapeProxy): The target landscape instance.
        height_data (Array[int32]): The Height Data for landscape in flatten int list format. (0-65535)

    Returns:
        bool: Succeeded or not.

get_heightmap_data

Get height data for specified Landscape

unreal.PythonLandscapeLib.get_heightmap_data(landscape) -> Array[int32]
    Get height data for specified Landscape

    Args:
        landscape (LandscapeProxy): The landscape instance for query.

    Returns:
        Array[int32]:

        height_data (Array[int32]): The Height Data of the landscape in flatten int list format. (0-65535)

cal_landscape_size

Calculate the Size of Landscape (the size of heightmap data).

unreal.PythonLandscapeLib.cal_landscape_size(section_size, sections_per_component, component_count_x, component_count_y) -> (out_size_x=int32, out_size_y=int32)
    Calculate the Size of Landscape (the size of heightmap data).

    Args:
        section_size (int32): The Section Size of the landscape.
        sections_per_component (int32): The Section count of each component. (1 or 2)
        component_count_x (int32): Number of components in Axis X.
        component_count_y (int32): Number of components in Axis Y.

    Returns:
        tuple:

        out_size_x (int32): The size of landscape in Axis X, (ComponentCountX * QuadsPerComponent + 1).

        out_size_y (int32): The size of landscape in Axis Y.

landscape_get_grass_components

Get the HISM component for drawing GrassType.

unreal.PythonLandscapeLib.landscape_get_grass_components(landscape_proxy) -> Array[HierarchicalInstancedStaticMeshComponent]
    Get the HISM component for drawing GrassType.

    Args:
        landscape_proxy (LandscapeProxy): The landscape owned the GrassTypes.

    Returns:
        Array[HierarchicalInstancedStaticMeshComponent]:

        out_grasses (Array[HierarchicalInstancedStaticMeshComponent]): The HISM component for drawing GrassTypes.

landscape_flush_grass_components

Flush the grass cache of landscape.

unreal.PythonLandscapeLib.landscape_flush_grass_components(landscape_proxy, flush_grass_maps=True) -> None
    Flush the grass cache of landscape.

    Args:
        landscape_proxy (LandscapeProxy):
        flush_grass_maps (bool): Flush GrassMaps or not.

landscape_update_grass

Update the grass cache of landscape proxy.

unreal.PythonLandscapeLib.landscape_update_grass(landscape_proxy, cameras, force_sync) -> None
    Update the grass cache of landscape proxy.
    note: added in v1.0.9

    Args:
        landscape_proxy (LandscapeProxy): The landscape owned the GrassTypes.
        cameras (Array[Vector]): Cameras to use for culling, if empty, then NO culling
        force_sync (bool): if true, block and finish all work

Other Editor Python Libs: