Files
UnrealEngineUWP/Engine/Source/Runtime/AnimGraphRuntime/Private/AnimNodes/AnimNode_BlendSpaceEvaluator.cpp
Ben Marsh 7598af0532 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

[CL 4662404 by Ben Marsh in Main branch]
2018-12-14 13:41:00 -05:00

32 lines
914 B
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#include "AnimNodes/AnimNode_BlendSpaceEvaluator.h"
#include "Animation/BlendSpaceBase.h"
/////////////////////////////////////////////////////
// FAnimNode_BlendSpaceEvaluator
FAnimNode_BlendSpaceEvaluator::FAnimNode_BlendSpaceEvaluator()
: FAnimNode_BlendSpacePlayer()
, NormalizedTime(0.f)
{
}
void FAnimNode_BlendSpaceEvaluator::UpdateAssetPlayer(const FAnimationUpdateContext& Context)
{
GetEvaluateGraphExposedInputs().Execute(Context);
InternalTimeAccumulator = FMath::Clamp(NormalizedTime, 0.f, 1.f);
PlayRate = 0.f;
UpdateInternal(Context);
}
void FAnimNode_BlendSpaceEvaluator::GatherDebugData(FNodeDebugData& DebugData)
{
FString DebugLine = DebugData.GetNodeName(this);
DebugLine += FString::Printf(TEXT("('%s' Play Time: %.3f)"), *BlendSpace->GetName(), InternalTimeAccumulator);
DebugData.AddDebugItem(DebugLine, true);
}