You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Headers are updated to contain any missing #includes needed to compile and #includes are sorted. Nothing is removed. #ushell-cherrypick of 21064294 by bryan.sefcik #jira #preflight 62d5c2111062f2e63015e598 #ROBOMERGE-OWNER: bryan.sefcik #ROBOMERGE-AUTHOR: bryan.sefcik #ROBOMERGE-SOURCE: CL 21155249 via CL 21158121 via CL 21161259 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824) [CL 21182053 by bryan sefcik in ue5-main branch]
58 lines
1.4 KiB
C
58 lines
1.4 KiB
C
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/UnrealString.h"
|
|
#include "HAL/Platform.h"
|
|
#include "SceneTypes.h"
|
|
#include "Templates/TypeHash.h"
|
|
#include "UObject/NameTypes.h"
|
|
#include "UObject/UnrealNames.h"
|
|
|
|
/** Structure extending EMaterialProperty to allow detailed information about custom output */
|
|
struct FMaterialPropertyEx
|
|
{
|
|
FMaterialPropertyEx(EMaterialProperty Type = MP_MAX, const FName& CustomOutput = NAME_None)
|
|
: Type(Type)
|
|
, CustomOutput(CustomOutput)
|
|
{}
|
|
|
|
FMaterialPropertyEx(const FName& CustomOutput)
|
|
: Type(MP_CustomOutput)
|
|
, CustomOutput(CustomOutput)
|
|
{}
|
|
|
|
FMaterialPropertyEx(const TCHAR* CustomOutput)
|
|
: Type(MP_CustomOutput)
|
|
, CustomOutput(CustomOutput)
|
|
{}
|
|
|
|
FORCEINLINE bool IsCustomOutput() const
|
|
{
|
|
return Type == MP_CustomOutput;
|
|
}
|
|
|
|
FORCEINLINE bool operator ==(const FMaterialPropertyEx& Other) const
|
|
{
|
|
return Type == Other.Type && (!IsCustomOutput() || CustomOutput == Other.CustomOutput);
|
|
}
|
|
|
|
FORCEINLINE bool operator !=(const FMaterialPropertyEx& Other) const
|
|
{
|
|
return !(*this == Other);
|
|
}
|
|
|
|
friend FORCEINLINE uint32 GetTypeHash(const FMaterialPropertyEx& Other)
|
|
{
|
|
return !Other.IsCustomOutput() ? GetTypeHash(Other.Type) : GetTypeHash(Other.CustomOutput);
|
|
}
|
|
|
|
MATERIALBAKING_API FString ToString() const;
|
|
|
|
/** The material property */
|
|
EMaterialProperty Type;
|
|
|
|
/** The name of a specific custom output. Only used if property is MP_CustomOutput */
|
|
FName CustomOutput;
|
|
};
|