You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
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 #ROBOMERGE-AUTHOR: thomas.sarkanen #ROBOMERGE-SOURCE: CL 17472894 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530) [CL 17472913 by thomas sarkanen in ue5-release-engine-test branch]
67 lines
1.8 KiB
C++
67 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SAnimNodeReference.h"
|
|
|
|
#include "SLevelOfDetailBranchNode.h"
|
|
#include "EditorStyleSet.h"
|
|
#include "K2Node_AnimNodeReference.h"
|
|
#include "SGraphPin.h"
|
|
#include "Widgets/Layout/SWrapBox.h"
|
|
#include "Widgets/Layout/SSpacer.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "SAnimNodeReferenceNode"
|
|
|
|
void SAnimNodeReference::Construct(const FArguments& InArgs, UK2Node_AnimNodeReference* InNode)
|
|
{
|
|
GraphNode = InNode;
|
|
UpdateGraphNode();
|
|
}
|
|
|
|
TSharedRef<SWidget> SAnimNodeReference::UpdateTitleWidget(FText InTitleText, TSharedPtr<SWidget> InTitleWidget, EHorizontalAlignment& InOutTitleHAlign, FMargin& InOutTitleMargin) const
|
|
{
|
|
UK2Node_AnimNodeReference* K2Node_AnimNodeReference = CastChecked<UK2Node_AnimNodeReference>(GraphNode);
|
|
|
|
InTitleWidget =
|
|
SNew(SLevelOfDetailBranchNode)
|
|
.UseLowDetailSlot(this, &SAnimNodeReference::UseLowDetailNodeTitles)
|
|
.LowDetail()
|
|
[
|
|
SNew(SSpacer)
|
|
]
|
|
.HighDetail()
|
|
[
|
|
SNew(SVerticalBox)
|
|
+SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
[
|
|
SNew(STextBlock)
|
|
.Text_Lambda([K2Node_AnimNodeReference]()
|
|
{
|
|
return K2Node_AnimNodeReference->GetLabelText();
|
|
})
|
|
]
|
|
+SVerticalBox::Slot()
|
|
.AutoHeight()
|
|
[
|
|
SNew(STextBlock)
|
|
.Text(LOCTEXT("NodeSubTitle", "Anim Node Reference"))
|
|
.TextStyle(&FEditorStyle::Get().GetWidgetStyle<FTextBlockStyle>("AnimGraph.AnimNodeReference.Subtitle"))
|
|
]
|
|
];
|
|
|
|
InOutTitleHAlign = HAlign_Left;
|
|
InOutTitleMargin = FMargin(12.0f, 8.0f, 36.0f, 6.0f);
|
|
|
|
return InTitleWidget.ToSharedRef();
|
|
}
|
|
|
|
TSharedPtr<SGraphPin> SAnimNodeReference::CreatePinWidget(UEdGraphPin* Pin) const
|
|
{
|
|
TSharedPtr<SGraphPin> DefaultWidget = SGraphNodeK2Var::CreatePinWidget(Pin);
|
|
DefaultWidget->SetShowLabel(false);
|
|
|
|
return DefaultWidget;
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE |