Files
UnrealEngineUWP/Engine/Source/Editor/LevelAssetEditor/Private/LevelEditorToolsContextInterfaces.cpp
brooke hubert 0e65cf7202 Add getters in context queries API for viewports so that tools can query the viewport client for input context directly.
#Jira none
#rb ryan.schmidt
[FYI] lauren.barnes

#ROBOMERGE-SOURCE: CL 15527815 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15527825 by brooke hubert in ue5-main branch]
2021-02-25 09:47:14 -04:00

89 lines
2.4 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "LevelEditorToolsContextInterfaces.h"
#include "InteractiveToolsContext.h"
#include "Math/Quat.h"
FLevelEditorToolsContextQueriesImpl::FLevelEditorToolsContextQueriesImpl(UInteractiveToolsContext* InContext)
: ToolsContext(InContext)
{
check(ToolsContext);
}
void FLevelEditorToolsContextQueriesImpl::GetCurrentSelectionState(FToolBuilderState& StateOut) const
{
StateOut.ToolManager = ToolsContext->ToolManager;
StateOut.GizmoManager = ToolsContext->GizmoManager;
StateOut.World = nullptr;
StateOut.SelectedActors.Empty();
StateOut.SelectedComponents.Empty();
StateOut.TypedElementSelectionSet.Reset();
}
void FLevelEditorToolsContextQueriesImpl::GetCurrentViewState(FViewCameraState& StateOut) const
{
StateOut.bIsOrthographic = false;
StateOut.Position = FVector::ZeroVector;
StateOut.HorizontalFOVDegrees = 100.f;
StateOut.AspectRatio = 1.f;
StateOut.Orientation = FQuat::Identity;
StateOut.bIsVR = false;
}
EToolContextCoordinateSystem FLevelEditorToolsContextQueriesImpl::GetCurrentCoordinateSystem() const
{
return EToolContextCoordinateSystem::World;
}
bool FLevelEditorToolsContextQueriesImpl::ExecuteSceneSnapQuery(const FSceneSnapQueryRequest& Request, TArray<FSceneSnapQueryResult>& Results) const
{
return false;
}
UMaterialInterface* FLevelEditorToolsContextQueriesImpl::GetStandardMaterial(EStandardToolContextMaterials MaterialType) const
{
return nullptr;
}
void FLevelEditorContextTransactionImpl::DisplayMessage(const FText& Message, EToolMessageLevel Level)
{
}
FViewport* FLevelEditorToolsContextQueriesImpl::GetHoveredViewport() const
{
return nullptr;
}
FViewport* FLevelEditorToolsContextQueriesImpl::GetFocusedViewport() const
{
return nullptr;
}
void FLevelEditorContextTransactionImpl::PostInvalidation()
{
}
void FLevelEditorContextTransactionImpl::BeginUndoTransaction(const FText& Description)
{
}
void FLevelEditorContextTransactionImpl::EndUndoTransaction()
{
}
void FLevelEditorContextTransactionImpl::AppendChange(UObject* TargetObject, TUniquePtr<FToolCommandChange> Change, const FText& Description)
{
}
bool FLevelEditorContextTransactionImpl::RequestSelectionChange(const FSelectedOjectsChangeList& SelectionChange)
{
return false;
}
bool FLevelEditorContextTransactionImpl::RequestToolSelectionStore(const UInteractiveToolStorableSelection* StorableSelection,
const FToolSelectionStoreParams& Params)
{
return false;
}