You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
*) 'Overview' shows skin cache on/off, recompute tangents on/off *) 'Memory' shows skin cache memory consumption per sk mesh, includes RT if sk mesh uses a separate RT entry *) 'RayTracingLODOffset` shows RT LOD index offset from raster LOD index #jira UE-136542 #rb jeremy.moore #preflight 622bb12b902b7ca699df8755 [CL 19383862 by Josie Yang in ue5-main branch]
76 lines
3.2 KiB
C++
76 lines
3.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "DebugCameraControllerSettingsCustomization.h"
|
|
#include "Engine/DebugCameraControllerSettings.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
#include "PropertyRestriction.h"
|
|
#include "IDetailChildrenBuilder.h"
|
|
#include "DetailLayoutBuilder.h"
|
|
#include "DetailCategoryBuilder.h"
|
|
#include "DetailWidgetRow.h"
|
|
#include "IDetailPropertyRow.h"
|
|
#include "ShowFlags.h"
|
|
#include "RHI.h"
|
|
|
|
|
|
TSharedRef<IPropertyTypeCustomization> FDebugCameraControllerSettingsViewModeIndexCustomization::MakeInstance()
|
|
{
|
|
return MakeShareable( new FDebugCameraControllerSettingsViewModeIndexCustomization);
|
|
}
|
|
|
|
FDebugCameraControllerSettingsViewModeIndexCustomization::FDebugCameraControllerSettingsViewModeIndexCustomization()
|
|
{
|
|
}
|
|
|
|
void FDebugCameraControllerSettingsViewModeIndexCustomization::CustomizeHeader(TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
|
|
{
|
|
uint32 NumChildren;
|
|
StructPropertyHandle->GetNumChildren(NumChildren);
|
|
TSharedPtr<IPropertyHandle> ViewModeIndexHandle;
|
|
|
|
for (uint32 ChildIndex = 0; ChildIndex < NumChildren; ++ChildIndex)
|
|
{
|
|
const TSharedRef< IPropertyHandle > ChildHandle = StructPropertyHandle->GetChildHandle(ChildIndex).ToSharedRef();
|
|
|
|
if (ChildHandle->GetProperty()->GetName() == TEXT("ViewModeIndex"))
|
|
{
|
|
ViewModeIndexHandle = ChildHandle;
|
|
}
|
|
}
|
|
|
|
check(ViewModeIndexHandle.IsValid());
|
|
|
|
TSharedPtr<FPropertyRestriction> EnumRestriction = MakeShareable(new FPropertyRestriction(NSLOCTEXT("DebugCycleViewModes", "DebugCycleViewModes", "Cycle view modes for debug camera controller")));
|
|
const UEnum* const ViewModeIndexEnum = StaticEnum<EViewModeIndex>();
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_VisualizeBuffer));
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_VisualizeNanite));
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_VisualizeLumen));
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_VisualizeVirtualShadowMap));
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_VisualizeGPUSkinCache));
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_StationaryLightOverlap));
|
|
#if RHI_RAYTRACING
|
|
if (!GRHISupportsRayTracing || !GRHISupportsRayTracingShaders)
|
|
{
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_PathTracing));
|
|
EnumRestriction->AddHiddenValue(ViewModeIndexEnum->GetNameStringByValue((uint8)EViewModeIndex::VMI_RayTracingDebug));
|
|
}
|
|
#endif
|
|
ViewModeIndexHandle->AddRestriction(EnumRestriction.ToSharedRef());
|
|
|
|
HeaderRow
|
|
.NameContent()
|
|
[
|
|
StructPropertyHandle->CreatePropertyNameWidget()
|
|
]
|
|
.ValueContent()
|
|
.MinDesiredWidth(500)
|
|
[
|
|
ViewModeIndexHandle->CreatePropertyValueWidget()
|
|
];
|
|
}
|
|
|
|
void FDebugCameraControllerSettingsViewModeIndexCustomization::CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
|
|
{
|
|
}
|
|
|