Files
UnrealEngineUWP/Engine/Source/Editor/AnimGraph/Private/AnimGraphNode_StateResult.cpp
Thomas Sarkanen 8b3709fb28 Restricted anim BP compiler subsystem APIs
Removed direct access to currently compiling BP class to restrict unguarded mutation.
Const-corrected various accessors and overrides.
Moved UObject-based compiler subsystems to 'handlers' and removed UObject dependency.
Moved from set of virtual functions on subsystems/handlers to a restricted set of contexts passed to specific multicast delegates that handlers subscribe to.
Removed anim class subsystems.
Moved property access code to engine module (editor code is still in a plugin).
Fixed nativized builds where anim BPs have nativized/non-nativized classes in the hierarchy

#rb Dan.OConnor
#jira none

[CL 14278258 by Thomas Sarkanen in ue5-main branch]
2020-09-09 08:32:25 -04:00

57 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "AnimGraphNode_StateResult.h"
#include "GraphEditorSettings.h"
#include "AnimBlueprintCompiler.h"
#include "AnimBlueprintCompilerHandler_Base.h"
#include "IAnimBlueprintCompilationContext.h"
#define LOCTEXT_NAMESPACE "A3Nodes"
/////////////////////////////////////////////////////
// UAnimGraphNode_StateResult
UAnimGraphNode_StateResult::UAnimGraphNode_StateResult(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
}
FLinearColor UAnimGraphNode_StateResult::GetNodeTitleColor() const
{
return GetDefault<UGraphEditorSettings>()->ResultNodeTitleColor;
}
FText UAnimGraphNode_StateResult::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
return LOCTEXT("AnimGraphNodeStateResult_Title", "Output Animation Pose");
}
FText UAnimGraphNode_StateResult::GetTooltipText() const
{
return LOCTEXT("AnimGraphNodeStateResult_Tooltip", "This is the output of this animation state");
}
bool UAnimGraphNode_StateResult::IsSinkNode() const
{
return true;
}
void UAnimGraphNode_StateResult::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const
{
// Intentionally empty. This node is auto-generated when a new graph is created.
}
FString UAnimGraphNode_StateResult::GetDocumentationLink() const
{
return TEXT("Shared/GraphNodes/AnimationStateMachine");
}
void UAnimGraphNode_StateResult::OnProcessDuringCompilation(IAnimBlueprintCompilationContext& InCompilationContext, IAnimBlueprintGeneratedClassCompiledData& OutCompiledData)
{
UAnimGraphNode_StateResult* TrueNode = InCompilationContext.GetMessageLog().FindSourceObjectTypeChecked<UAnimGraphNode_StateResult>(this);
Node.Name = TrueNode->GetGraph()->GetFName();
}
#undef LOCTEXT_NAMESPACE