You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-13391 - Delete old BP menu system (is causing confusion) #codereview Mike.Beach [CL 2514361 by Michael Schoell in Main branch]
67 lines
2.5 KiB
C++
67 lines
2.5 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "AnimGraphPrivatePCH.h"
|
|
#include "AnimGraphNode_TransitionPoseEvaluator.h"
|
|
#include "AnimationCustomTransitionGraph.h"
|
|
|
|
#include "CompilerResultsLog.h"
|
|
#include "GraphEditorActions.h"
|
|
|
|
/////////////////////////////////////////////////////
|
|
// UAnimGraphNode_TransitionPoseEvaluator
|
|
|
|
#define LOCTEXT_NAMESPACE "UAnimGraphNode_TransitionPoseEvaluator"
|
|
|
|
UAnimGraphNode_TransitionPoseEvaluator::UAnimGraphNode_TransitionPoseEvaluator(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
}
|
|
|
|
FLinearColor UAnimGraphNode_TransitionPoseEvaluator::GetNodeTitleColor() const
|
|
{
|
|
return FColor(200, 100, 100);
|
|
}
|
|
|
|
FText UAnimGraphNode_TransitionPoseEvaluator::GetTooltipText() const
|
|
{
|
|
return (Node.DataSource == EEvaluatorDataSource::EDS_DestinationPose) ? LOCTEXT("GetDestinationStatePose_Tooltip", "Evaluates and returns the pose generated by the destination state of this transition") : LOCTEXT("GetSourceStatePose_Tooltip", "Evaluates and returns the pose generated by the setup prior to this transition firing");
|
|
}
|
|
|
|
FText UAnimGraphNode_TransitionPoseEvaluator::GetNodeTitle(ENodeTitleType::Type TitleType) const
|
|
{
|
|
if (TitleType == ENodeTitleType::FullTitle)
|
|
{
|
|
return (Node.DataSource == EEvaluatorDataSource::EDS_DestinationPose) ? LOCTEXT("GetDestinationStatePose", "Get Destination State Pose") : LOCTEXT("GetSourceStatePose", "Get Source State Pose");
|
|
}
|
|
|
|
return LOCTEXT("InputPoseEvaluator", "Input Pose Evaluator");
|
|
}
|
|
|
|
void UAnimGraphNode_TransitionPoseEvaluator::ValidateAnimNodeDuringCompilation(class USkeleton* ForSkeleton, class FCompilerResultsLog& MessageLog)
|
|
{
|
|
if ((Node.EvaluatorMode != EEvaluatorMode::EM_Standard) && Node.FramesToCachePose < 1)
|
|
{
|
|
MessageLog.Error(TEXT("@@ is set to a mode that caches the pose, but frames to cache is less then 1."), this);
|
|
}
|
|
|
|
Super::ValidateAnimNodeDuringCompilation(ForSkeleton, MessageLog);
|
|
}
|
|
|
|
FString UAnimGraphNode_TransitionPoseEvaluator::GetNodeCategory() const
|
|
{
|
|
return TEXT("Transition");
|
|
}
|
|
|
|
bool UAnimGraphNode_TransitionPoseEvaluator::CanUserDeleteNode() const
|
|
{
|
|
// Allow deleting the node if we're in the wrong kind of graph (via some accident or regression)
|
|
return !(GetGraph()->IsA(UAnimationCustomTransitionGraph::StaticClass()));
|
|
}
|
|
|
|
void UAnimGraphNode_TransitionPoseEvaluator::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const
|
|
{
|
|
// Intentionally empty: Don't allow an option to create them, as they're auto-created when custom blend graphs are made
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|