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]
82 lines
3.1 KiB
C++
82 lines
3.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
#include "Input/Reply.h"
|
|
#include "Styling/SlateColor.h"
|
|
#include "SNodePanel.h"
|
|
#include "KismetNodes/SGraphNodeK2Base.h"
|
|
#include "Engine/PoseWatch.h"
|
|
|
|
class UAnimGraphNode_Base;
|
|
class IDetailTreeNode;
|
|
class IPropertyRowGenerator;
|
|
class UAnimBlueprint;
|
|
class SPoseWatchOverlay;
|
|
|
|
class ANIMATIONBLUEPRINTEDITOR_API SAnimationGraphNode : public SGraphNodeK2Base
|
|
{
|
|
public:
|
|
SLATE_BEGIN_ARGS(SAnimationGraphNode) {}
|
|
SLATE_END_ARGS()
|
|
|
|
// Reverse index of the error reporting bar slot
|
|
static const int32 ErrorReportingSlotReverseIndex = 0;
|
|
|
|
// Reverse index of the tag/functions slot
|
|
static const int32 TagAndFunctionsSlotReverseIndex = 1;
|
|
|
|
void Construct(const FArguments& InArgs, UAnimGraphNode_Base* InNode);
|
|
|
|
// Tweak any created pin widgets so they respond to bindings
|
|
static void ReconfigurePinWidgetsForPropertyBindings(UAnimGraphNode_Base* InAnimGraphNode, TSharedRef<SGraphNode> InGraphNodeWidget, TFunctionRef<TSharedPtr<SGraphPin>(UEdGraphPin*)> InFindWidgetForPin);
|
|
|
|
// Create below-widget controls for editing anim node functions
|
|
static TSharedRef<SWidget> CreateNodeFunctionsWidget(UAnimGraphNode_Base* InAnimNode, TAttribute<bool> InUseLowDetail);
|
|
|
|
// Create below-widget controls for editing anim node tags
|
|
static TSharedRef<SWidget> CreateNodeTagWidget(UAnimGraphNode_Base* InAnimNode, TAttribute<bool> InUseLowDetail);
|
|
|
|
protected:
|
|
// SWidget interface
|
|
virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override;
|
|
// End of SWidget interface
|
|
|
|
// SGraphNode interface
|
|
virtual TArray<FOverlayWidgetInfo> GetOverlayWidgets(bool bSelected, const FVector2D& WidgetSize) const override;
|
|
virtual TSharedRef<SWidget> CreateTitleWidget(TSharedPtr<SNodeTitle> InNodeTitle) override;
|
|
virtual void GetNodeInfoPopups(FNodeInfoContext* Context, TArray<FGraphInformationPopupInfo>& Popups) const override;
|
|
virtual void CreateBelowPinControls(TSharedPtr<SVerticalBox> MainBox) override;
|
|
virtual TSharedRef<SWidget> CreateNodeContentArea() override;
|
|
virtual bool IsHidingPinWidgets() const override { return UseLowDetailNodeContent(); }
|
|
// End of SGraphNode interface
|
|
|
|
private:
|
|
// Handle the node informing us that the title has changed
|
|
void HandleNodeTitleChanged();
|
|
|
|
// LOD related functions for content area
|
|
bool UseLowDetailNodeContent() const;
|
|
FVector2D GetLowDetailDesiredSize() const;
|
|
|
|
// Handler for pose watches changing
|
|
void HandlePoseWatchesChanged(UAnimBlueprint* InAnimBlueprint, UEdGraphNode* InNode);
|
|
|
|
/** Keep a reference to the indicator widget handing around */
|
|
TSharedPtr<SWidget> IndicatorWidget;
|
|
|
|
/** Keep a reference to the pose view indicator widget handing around */
|
|
TSharedPtr<SPoseWatchOverlay> PoseViewWidget;
|
|
|
|
/** Cache the node title so we can invalidate it */
|
|
TSharedPtr<SNodeTitle> NodeTitle;
|
|
|
|
/** Cached size from when we last drew at high detail */
|
|
FVector2D LastHighDetailSize;
|
|
|
|
/** Cached content area widget (used to derive LastHighDetailSize) */
|
|
TSharedPtr<SWidget> CachedContentArea;
|
|
};
|