You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb Aaron.Cox, Jurre.DeBaare #preflight 61fd7b9fe65336d14550704c #ROBOMERGE-AUTHOR: jose.villarroel #ROBOMERGE-SOURCE: CL 18872694 via CL 18872736 via CL 18872771 via CL 18875005 via CL 18875491 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042) [CL 18875508 by jose villarroel in ue5-main branch]
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
#include "AnimPreviewAttacheInstance.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "AnimPreviewAttacheInstance"
|
|
|
|
void FAnimPreviewAttacheInstanceProxy::Initialize(UAnimInstance* InAnimInstance)
|
|
{
|
|
FAnimInstanceProxy::Initialize(InAnimInstance);
|
|
|
|
FAnimationInitializeContext InitContext(this);
|
|
CopyPoseFromMesh.bUseAttachedParent = true;
|
|
CopyPoseFromMesh.Initialize_AnyThread(InitContext);
|
|
}
|
|
|
|
void FAnimPreviewAttacheInstanceProxy::PreUpdate(UAnimInstance* InAnimInstance, float DeltaSeconds)
|
|
{
|
|
FAnimInstanceProxy::PreUpdate(InAnimInstance, DeltaSeconds);
|
|
|
|
CopyPoseFromMesh.PreUpdate(InAnimInstance);
|
|
}
|
|
|
|
void FAnimPreviewAttacheInstanceProxy::UpdateAnimationNode(const FAnimationUpdateContext& InContext)
|
|
{
|
|
UpdateCounter.Increment();
|
|
|
|
CopyPoseFromMesh.Update_AnyThread(InContext);
|
|
}
|
|
|
|
bool FAnimPreviewAttacheInstanceProxy::Evaluate(FPoseContext& Output)
|
|
{
|
|
// we cant evaluate on a worker thread here because of the key delegate needing to be fired
|
|
CopyPoseFromMesh.Evaluate_AnyThread(Output);
|
|
return true;
|
|
}
|
|
|
|
UAnimPreviewAttacheInstance::UAnimPreviewAttacheInstance(const FObjectInitializer& ObjectInitializer)
|
|
: Super(ObjectInitializer)
|
|
{
|
|
RootMotionMode = ERootMotionMode::RootMotionFromEverything;
|
|
bUseMultiThreadedAnimationUpdate = false;
|
|
}
|
|
|
|
FAnimInstanceProxy* UAnimPreviewAttacheInstance::CreateAnimInstanceProxy()
|
|
{
|
|
return new FAnimPreviewAttacheInstanceProxy(this);
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|