You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Add Marquee & create widget tools. Add framework for widget-based tools. #preflight 62202c37123d7a7f69141278 #jira UETOOL-4564 UETOOL-4565 #rb Vincent.Gauthier [CL 19248542 by daren cheng in ue5-main branch]
71 lines
1.4 KiB
C++
71 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Tools/AssetEditorContextObject.h"
|
|
|
|
#include "EditorModeManager.h"
|
|
#include "Elements/Framework/TypedElementSelectionSet.h"
|
|
#include "Elements/Framework/TypedElementCommonActions.h"
|
|
#include "Toolkits/IToolkitHost.h"
|
|
|
|
const UTypedElementSelectionSet* UAssetEditorContextObject::GetSelectionSet() const
|
|
{
|
|
if (GetToolkitHost())
|
|
{
|
|
return GetToolkitHost()->GetEditorModeManager().GetEditorSelectionSet();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
UTypedElementSelectionSet* UAssetEditorContextObject::GetMutableSelectionSet()
|
|
{
|
|
if (GetToolkitHost())
|
|
{
|
|
return GetToolkitHost()->GetEditorModeManager().GetEditorSelectionSet();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
UTypedElementCommonActions* UAssetEditorContextObject::GetCommonActions()
|
|
{
|
|
if (GetToolkitHost())
|
|
{
|
|
return GetToolkitHost()->GetCommonActions();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
UWorld* UAssetEditorContextObject::GetEditingWorld() const
|
|
{
|
|
if (GetToolkitHost())
|
|
{
|
|
return GetToolkitHost()->GetWorld();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
const IToolkitHost* UAssetEditorContextObject::GetToolkitHost() const
|
|
{
|
|
return ToolkitHost;
|
|
}
|
|
|
|
IToolkitHost* UAssetEditorContextObject::GetMutableToolkitHost()
|
|
{
|
|
return ToolkitHost;
|
|
}
|
|
|
|
void UAssetEditorContextObject::SetToolkitHost(IToolkitHost* InToolkitHost)
|
|
{
|
|
ToolkitHost = InToolkitHost;
|
|
}
|
|
|
|
UWorld* UAssetEditorContextObject::GetWorld() const
|
|
{
|
|
return GetEditingWorld();
|
|
}
|
|
|
|
|