UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MaterialExpressionLandscapePhysicalMaterialOutput.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "MaterialValueType.h"
8#include "MaterialExpressionLandscapePhysicalMaterialOutput.generated.h"
9
11USTRUCT()
13{
15
16 UPROPERTY(EditAnywhere, Category = PhysicalMaterial)
17 TObjectPtr<class UPhysicalMaterial> PhysicalMaterial;
18
19 UPROPERTY(meta = (RequiredInput = "true"))
21
23 : PhysicalMaterial(nullptr)
24 {}
25};
26
34{
36
37 // Maximum number of supported grass types on a given landscape material. Whenever adjusting this, make sure to update LandscapeGrassWeight.usf accordingly:
38 static constexpr int32 MaxPhysicalMaterials = 16;
39
41 UPROPERTY(EditAnywhere, Category = PhysicalMaterial)
43
44#if WITH_EDITOR
45 //~ Begin UObject Interface
46 LANDSCAPE_API virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
47 //~ End UObject Interface
48
49 //~ Begin UMaterialExpression Interface
50 LANDSCAPE_API virtual void GetCaption(TArray<FString>& OutCaptions) const override;
52 LANDSCAPE_API virtual FExpressionInput* GetInput(int32 InputIndex) override;
53 LANDSCAPE_API virtual FName GetInputName(int32 InputIndex) const override;
54 virtual EMaterialValueType GetInputValueType(int32 InputIndex) override { return MCT_Float; }
55 LANDSCAPE_API virtual int32 Compile(class FMaterialCompiler* Compiler, int32 OutputIndex) override;
56
57 //~ End UMaterialExpression Interface
58#endif
59
60 //~ Begin UMaterialExpressionCustomOutput Interface
61 virtual int32 GetNumOutputs() const override { return Inputs.Num(); }
62 virtual int32 GetMaxOutputs() const { return MaxPhysicalMaterials; };
63 virtual FString GetFunctionName() const override { return TEXT("GetPhysicalMaterial"); }
64 //~ End UMaterialExpressionCustomOutput Interface
65};
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
EMaterialValueType
Definition MaterialValueType.h:15
@ MCT_Float
Definition MaterialValueType.h:89
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
Definition MaterialCompiler.h:109
Definition NameTypes.h:617
Definition ArrayView.h:139
UE_REWRITE SizeType Num() const
Definition Array.h:1144
Definition MaterialExpressionCustomOutput.h:15
Definition MaterialExpressionLandscapePhysicalMaterialOutput.h:34
Definition PhysicalMaterial.h:104
Definition MaterialExpressionIO.h:23
Definition MaterialExpressionLandscapePhysicalMaterialOutput.h:13
Definition UnrealType.h:6865
Definition ObjectPtr.h:488