Files
UnrealEngineUWP/Engine/Source/Editor/AnimationBlueprintEditor/Private/AnimationNodes/SGraphNodeSequencePlayer.h
Thomas Sarkanen a8c165387c Anim node references
Added the abiity to tag and retrieve any anim graph node (similar to how we could reference linked anim graph nodes previously).
Ported linked anim graph nodes to use the new system
Added the ability to reference any anim graph node by tag (via a new custom node, spawnable from the context menu, with the appearance of an actor reference in a level blueprint)
Added tag display and editing in the bottom-right of anim graph nodes
Added new override point to SGraphNodeK2Var to allow for title widget parameters to be overriden by child classes

#jira UE-126286 - Anim node functions: Add anim node references
#rb Jurre.deBaare
#preflight 613a1e0cf9a522000143c253

[CL 17472894 by Thomas Sarkanen in ue5-main branch]
2021-09-09 11:41:13 -04:00

51 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Layout/Visibility.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "SNodePanel.h"
#include "AnimationNodes/SAnimationGraphNode.h"
class SVerticalBox;
class UAnimGraphNode_Base;
class SGraphNodeSequencePlayer : public SAnimationGraphNode
{
public:
SLATE_BEGIN_ARGS(SGraphNodeSequencePlayer){}
SLATE_END_ARGS()
// Reverse index of the debug slider widget
static const int32 DebugSliderSlotReverseIndex = 2;
void Construct(const FArguments& InArgs, UAnimGraphNode_Base* InNode);
// SNodePanel::SNode interface
virtual void GetNodeInfoPopups(FNodeInfoContext* Context, TArray<FGraphInformationPopupInfo>& Popups) const override;
// End of SNodePanel::SNode interface
// SGraphNode interface
virtual void UpdateGraphNode() override;
virtual void CreateBelowPinControls(TSharedPtr<SVerticalBox> MainBox) override;
// End of SGraphNode interface
protected:
/** Get the sequence player associated with this graph node */
struct FAnimNode_SequencePlayer* GetSequencePlayer() const;
EVisibility GetSliderVisibility() const;
float GetSequencePositionRatio() const;
void SetSequencePositionRatio(float NewRatio);
FText GetPositionTooltip() const;
bool GetSequencePositionInfo(float& Out_Position, float& Out_Length, int32& FrameCount) const;
// Invalidates the node's label if we are syncing based on graph context
void UpdateGraphSyncLabel();
// Cached name to display when sync groups are dynamic
FName CachedSyncGroupName;
};