2020-01-08 17:11:23 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-10-19 14:01:44 -04:00
|
|
|
|
|
|
|
|
#include "EditorViewportLayoutEntity.h"
|
|
|
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
|
|
|
#include "Editor/UnrealEdEngine.h"
|
|
|
|
|
#include "LevelEditorViewport.h"
|
|
|
|
|
#include "UnrealEdGlobals.h"
|
|
|
|
|
#include "SAssetEditorViewport.h"
|
|
|
|
|
#include "EditorViewportCommands.h"
|
|
|
|
|
#include "EditorViewportTabContent.h"
|
|
|
|
|
|
2020-07-16 08:12:40 -04:00
|
|
|
FEditorViewportLayoutEntity::FEditorViewportLayoutEntity(TSharedPtr<SAssetEditorViewport>& InViewport)
|
|
|
|
|
: AssetEditorViewport(InViewport)
|
2019-10-19 14:01:44 -04:00
|
|
|
{
|
2020-07-16 08:12:40 -04:00
|
|
|
check(AssetEditorViewport.IsValid());
|
2019-10-19 14:01:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TSharedRef<SWidget> FEditorViewportLayoutEntity::AsWidget() const
|
|
|
|
|
{
|
|
|
|
|
return AssetEditorViewport.ToSharedRef();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TSharedPtr<SAssetEditorViewport> FEditorViewportLayoutEntity::AsAssetEditorViewport() const
|
|
|
|
|
{
|
|
|
|
|
return AssetEditorViewport;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FName FEditorViewportLayoutEntity::GetType() const
|
|
|
|
|
{
|
|
|
|
|
static FName DefaultName("Default");
|
|
|
|
|
return DefaultName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TSharedPtr<FEditorViewportClient> FEditorViewportLayoutEntity::GetViewportClient() const
|
|
|
|
|
{
|
|
|
|
|
return AssetEditorViewport->GetViewportClient();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEditorViewportLayoutEntity::SetKeyboardFocus()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEditorViewportLayoutEntity::OnLayoutDestroyed()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEditorViewportLayoutEntity::SaveConfig(const FString& ConfigSection)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void FEditorViewportLayoutEntity::TakeHighResScreenShot() const
|
|
|
|
|
{
|
|
|
|
|
GetViewportClient()->TakeHighResScreenShot();
|
|
|
|
|
}
|