This commit is contained in:
Rainer Leit
2026-09-25 17:02:24 +03:00
parent cc43ed8dc8
commit 9597629951
2149 changed files with 460234 additions and 1770 deletions
@@ -40,4 +40,15 @@ public:
static ALandscape* CreateLandscapeFromHeightmap(UWorld* World, const FString& HeightmapFile,
const TArray<FLandscapeAuthoringWeightmap>& Weightmaps, UMaterialInterface* Material,
FVector Location, FVector Scale, int32 WorldPartitionGridSize = 4);
// Creates a ULandscapeLayerInfoObject asset carrying LayerName, which is the name the landscape material
// blends by and the name a weightmap is imported against.
//
// The second thing the engine exposes no Python path to, and for the same reason as the first. There is no
// LayerInfo factory in the bindings, and ULandscapeLayerInfoObject::LayerName is VisibleAnywhere - so the
// obvious workaround, duplicating an existing layer info, produces an asset that silently keeps the name it
// was copied from and paints that substance wherever the new layer should be. Returns null and logs why on
// failure; an existing asset at the path is returned rather than replaced, so this is safe to rerun.
UFUNCTION(BlueprintCallable, Category = "Salty|Authoring")
static ULandscapeLayerInfoObject* CreateLayerInfo(const FString& PackagePath, const FString& AssetName, FName LayerName);
};