You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485 [CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "LiveLinkInstance.h"
|
|
|
|
void FLiveLinkInstanceProxy::Initialize(UAnimInstance* InAnimInstance)
|
|
{
|
|
FAnimInstanceProxy::Initialize(InAnimInstance);
|
|
|
|
// initialize node manually
|
|
FAnimationInitializeContext InitContext(this);
|
|
PoseNode.Initialize_AnyThread(InitContext);
|
|
}
|
|
|
|
void FLiveLinkInstanceProxy::PreUpdate(UAnimInstance* InAnimInstance, float DeltaSeconds)
|
|
{
|
|
Super::PreUpdate(InAnimInstance, DeltaSeconds);
|
|
|
|
if (PoseNode.HasPreUpdate())
|
|
{
|
|
PoseNode.PreUpdate(InAnimInstance);
|
|
}
|
|
}
|
|
|
|
bool FLiveLinkInstanceProxy::Evaluate(FPoseContext& Output)
|
|
{
|
|
PoseNode.Evaluate_AnyThread(Output);
|
|
|
|
return true;
|
|
}
|
|
|
|
void FLiveLinkInstanceProxy::UpdateAnimationNode(const FAnimationUpdateContext& InContext)
|
|
{
|
|
UpdateCounter.Increment();
|
|
|
|
PoseNode.Update_AnyThread(InContext);
|
|
|
|
if(ULiveLinkInstance* Instance = Cast<ULiveLinkInstance>(GetAnimInstanceObject()))
|
|
{
|
|
Instance->CurrentRetargetAsset = PoseNode.CurrentRetargetAsset; //Cache for GC
|
|
}
|
|
}
|
|
|
|
FAnimInstanceProxy* ULiveLinkInstance::CreateAnimInstanceProxy()
|
|
{
|
|
return new FLiveLinkInstanceProxy(this);
|
|
}
|
|
|
|
void ULiveLinkInstance::DestroyAnimInstanceProxy(FAnimInstanceProxy* InProxy)
|
|
{
|
|
Super::DestroyAnimInstanceProxy(InProxy);
|
|
CurrentRetargetAsset = nullptr;
|
|
} |