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]
65 lines
1.8 KiB
C++
65 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Containers/Map.h"
|
|
#include "UObject/NameTypes.h"
|
|
#include "Templates/SharedPointer.h"
|
|
#include "Framework/Commands/UICommandInfo.h"
|
|
#include "Framework/MultiBox/MultiBoxBuilder.h"
|
|
#include "Framework/Commands/Commands.h"
|
|
|
|
class FEditorViewportClient;
|
|
|
|
class UNREALED_API FGPUSkinCacheVisualizationMenuCommands : public TCommands<FGPUSkinCacheVisualizationMenuCommands>
|
|
{
|
|
public:
|
|
enum class FGPUSkinCacheVisualizationType : uint8
|
|
{
|
|
Overview,
|
|
Memory,
|
|
RayTracingLODOffset
|
|
};
|
|
|
|
struct FGPUSkinCacheVisualizationRecord
|
|
{
|
|
FName Name;
|
|
TSharedPtr<FUICommandInfo> Command;
|
|
FGPUSkinCacheVisualizationType Type;
|
|
|
|
FGPUSkinCacheVisualizationRecord()
|
|
: Name()
|
|
, Command()
|
|
, Type(FGPUSkinCacheVisualizationType::Overview)
|
|
{
|
|
}
|
|
};
|
|
|
|
typedef TMultiMap<FName, FGPUSkinCacheVisualizationRecord> TGPUSkinCacheVisualizationModeCommandMap;
|
|
typedef TGPUSkinCacheVisualizationModeCommandMap::TConstIterator TCommandConstIterator;
|
|
|
|
FGPUSkinCacheVisualizationMenuCommands();
|
|
|
|
TCommandConstIterator CreateCommandConstIterator() const;
|
|
|
|
static void BuildVisualisationSubMenu(FMenuBuilder& Menu);
|
|
|
|
virtual void RegisterCommands() override;
|
|
|
|
void BindCommands(FUICommandList& CommandList, const TSharedPtr<FEditorViewportClient>& Client) const;
|
|
|
|
inline bool IsPopulated() const
|
|
{
|
|
return CommandMap.Num() > 0;
|
|
}
|
|
|
|
private:
|
|
void BuildCommandMap();
|
|
bool AddCommandTypeToMenu(FMenuBuilder& Menu, const FGPUSkinCacheVisualizationType Type, bool bSeparatorBefore = false) const;
|
|
|
|
static void ChangeGPUSkinCacheVisualizationMode(const TSharedPtr<FEditorViewportClient>& Client, FName InName);
|
|
static bool IsGPUSkinCacheVisualizationModeSelected(const TSharedPtr<FEditorViewportClient>& Client, FName InName);
|
|
|
|
TGPUSkinCacheVisualizationModeCommandMap CommandMap;
|
|
};
|