2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2016-03-29 16:33:59 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2016-11-23 15:48:37 -05:00
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
|
|
|
#include "Input/Reply.h"
|
|
|
|
|
#include "Styling/SlateColor.h"
|
|
|
|
|
#include "SNodePanel.h"
|
|
|
|
|
#include "KismetNodes/SGraphNodeK2Base.h"
|
2016-07-20 18:23:54 -04:00
|
|
|
#include "Engine/PoseWatch.h"
|
2016-03-29 16:33:59 -04:00
|
|
|
|
2016-11-23 15:48:37 -05:00
|
|
|
class UAnimGraphNode_Base;
|
|
|
|
|
|
2020-09-24 00:43:27 -04:00
|
|
|
class ANIMATIONBLUEPRINTEDITOR_API SAnimationGraphNode : public SGraphNodeK2Base
|
2016-03-29 16:33:59 -04:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SLATE_BEGIN_ARGS(SAnimationGraphNode) {}
|
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
|
|
|
|
|
void Construct(const FArguments& InArgs, UAnimGraphNode_Base* InNode);
|
|
|
|
|
|
2021-01-25 08:43:19 -04:00
|
|
|
// Tweak any created pin widgets so they respond to bindings
|
|
|
|
|
static void ReconfigurePinWidgetsForPropertyBindings(UAnimGraphNode_Base* InAnimGraphNode, TFunctionRef<TSharedPtr<SGraphPin>(UEdGraphPin*)> InFindWidgetForPin);
|
|
|
|
|
|
2016-03-29 16:33:59 -04:00
|
|
|
protected:
|
2016-07-20 18:23:54 -04:00
|
|
|
// SWidget interface
|
|
|
|
|
virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override;
|
|
|
|
|
// End of SWidget interface
|
|
|
|
|
|
2016-03-29 16:33:59 -04:00
|
|
|
// SGraphNode interface
|
|
|
|
|
virtual TArray<FOverlayWidgetInfo> GetOverlayWidgets(bool bSelected, const FVector2D& WidgetSize) const override;
|
2019-09-26 09:15:50 -04:00
|
|
|
virtual TSharedRef<SWidget> CreateTitleWidget(TSharedPtr<SNodeTitle> InNodeTitle) override;
|
2019-12-13 11:07:03 -05:00
|
|
|
virtual void GetNodeInfoPopups(FNodeInfoContext* Context, TArray<FGraphInformationPopupInfo>& Popups) const override;
|
2016-03-29 16:33:59 -04:00
|
|
|
// End of SGraphNode interface
|
|
|
|
|
|
|
|
|
|
private:
|
2016-07-20 18:23:54 -04:00
|
|
|
// Return Pose View Colour for slate indicator
|
|
|
|
|
FSlateColor GetPoseViewColour() const;
|
|
|
|
|
|
|
|
|
|
FReply SpawnColourPicker();
|
|
|
|
|
|
2019-09-26 09:15:50 -04:00
|
|
|
// Handle the node informing us that the title has changed
|
|
|
|
|
void HandleNodeTitleChanged();
|
|
|
|
|
|
2016-03-29 16:33:59 -04:00
|
|
|
/** Keep a reference to the indicator widget handing around */
|
|
|
|
|
TSharedPtr<SWidget> IndicatorWidget;
|
2016-07-20 18:23:54 -04:00
|
|
|
|
|
|
|
|
/** Keep a reference to the pose view indicator widget handing around */
|
|
|
|
|
TSharedPtr<SWidget> PoseViewWidget;
|
|
|
|
|
|
2019-09-26 09:15:50 -04:00
|
|
|
/** Cache the node title so we can invalidate it */
|
|
|
|
|
TSharedPtr<SNodeTitle> NodeTitle;
|
|
|
|
|
|
2016-07-20 18:23:54 -04:00
|
|
|
TWeakObjectPtr<class UPoseWatch> PoseWatch;
|
2016-11-23 15:48:37 -05:00
|
|
|
};
|