You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-106437, UE-106437 #rb Thomas.Sarkanen #preflight 61a0bf1ec3287aab27415d7e #ROBOMERGE-AUTHOR: lucas.dower #ROBOMERGE-SOURCE: CL 18299107 in //UE5/Release-5.0/... via CL 18299120 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18299122 by lucas dower in ue5-release-engine-test branch]
53 lines
1.5 KiB
C++
53 lines
1.5 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AnimationNodes/SGraphNodeStateMachineInstance.h"
|
|
#include "AnimationStateMachineGraph.h"
|
|
#include "AnimGraphNode_StateMachineBase.h"
|
|
#include "Engine/PoseWatch.h"
|
|
#include "AnimationEditorUtils.h"
|
|
#include "Widgets/Input/SButton.h"
|
|
#include "Widgets/Images/SImage.h"
|
|
#include "SPoseWatchOverlay.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "SGraphNodeStateMachineInstance"
|
|
|
|
/////////////////////////////////////////////////////
|
|
// SGraphNodeStateMachineInstance
|
|
|
|
void SGraphNodeStateMachineInstance::Construct(const FArguments& InArgs, UAnimGraphNode_StateMachineBase* InNode)
|
|
{
|
|
GraphNode = InNode;
|
|
|
|
SetCursor(EMouseCursor::CardinalCross);
|
|
|
|
PoseWatchWidget = SNew(SPoseWatchOverlay, InNode);
|
|
|
|
UpdateGraphNode();
|
|
}
|
|
|
|
UEdGraph* SGraphNodeStateMachineInstance::GetInnerGraph() const
|
|
{
|
|
UAnimGraphNode_StateMachineBase* StateMachineInstance = CastChecked<UAnimGraphNode_StateMachineBase>(GraphNode);
|
|
|
|
return StateMachineInstance->EditorStateMachineGraph;
|
|
}
|
|
|
|
TArray<FOverlayWidgetInfo> SGraphNodeStateMachineInstance::GetOverlayWidgets(bool bSelected, const FVector2D& WidgetSize) const
|
|
{
|
|
TArray<FOverlayWidgetInfo> Widgets;
|
|
|
|
if (UAnimGraphNode_Base* AnimNode = CastChecked<UAnimGraphNode_Base>(GraphNode, ECastCheckedType::NullAllowed))
|
|
{
|
|
if (PoseWatchWidget->IsPoseWatchValid())
|
|
{
|
|
FOverlayWidgetInfo Info;
|
|
Info.OverlayOffset = PoseWatchWidget->GetOverlayOffset();
|
|
Info.Widget = PoseWatchWidget;
|
|
Widgets.Add(Info);
|
|
}
|
|
}
|
|
|
|
return Widgets;
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE |