Files
UnrealEngineUWP/Engine/Source/Editor/LandscapeEditor/Public/LandscapeEditorUtils.h
T
don boogert cf3190c988 Landscape : Fix Landscape Export Save Dialog
* The open dialog was incorrectly used for selecting fils to export

#rb chris.tchou

[CL 25824406 by don boogert in ue5-main branch]
2023-06-06 15:03:49 -04:00

31 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "FileHelpers.h"
class ALandscapeProxy;
class ALandscapeStreamingProxy;
class ULandscapeLayerInfoObject;
class UWorldPartition;
namespace LandscapeEditorUtils
{
bool LANDSCAPEEDITOR_API SetHeightmapData(ALandscapeProxy* Landscape, const TArray<uint16>& Data);
bool LANDSCAPEEDITOR_API SetWeightmapData(ALandscapeProxy* Landscape, ULandscapeLayerInfoObject* LayerObject, const TArray<uint8>& Data);
int32 GetMaxSizeInComponents();
TOptional<FString> GetImportExportFilename(const FString& InDialogTitle, const FString& InStartPath, const FString& InDialogTypeString, bool bInImporting);
template<typename T>
void SaveObjects(TArrayView<T*> InObjects)
{
TArray<UPackage*> Packages;
Algo::Transform(InObjects, Packages, [](UObject* InObject) { return InObject->GetPackage(); });
UEditorLoadingAndSavingUtils::SavePackages(Packages, /* bOnlyDirty = */ false);
}
void SaveLandscapeProxies(TArrayView<ALandscapeProxy*> Proxies, UWorldPartition* WorldPartition);
}