Files
UnrealEngineUWP/Engine/Source/Runtime/AnimGraphRuntime/Private/AnimCustomInstanceHelper.cpp
Alexis Matte 73d83c6a38 To protect the skeletalmesh when using async operations like build or re-import we deprecate all public member variables of USkeletalMesh class and create the necessary getter and setter. Those member will stay public but will be move to private in a future release.
Adding a public member to USkeletalMesh class is now prohibed since it can break asynchronous operations that will be added next to this submit.

#rb danny.couture
#jira UEENT-3936
#rnx

[CL 14812920 by Alexis Matte in ue5-main branch]
2020-11-25 11:17:08 -04:00

19 lines
804 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "AnimCustomInstanceHelper.h"
/////////////////////////////////////////////////////
// FAnimCustomInstanceHelper
/////////////////////////////////////////////////////
bool FAnimCustomInstanceHelper::ShouldCreateCustomInstancePlayer(const USkeletalMeshComponent* SkeletalMeshComponent)
{
const USkeletalMesh* SkeletalMesh = SkeletalMeshComponent->SkeletalMesh;
// create proper anim instance to animate
UAnimInstance* AnimInstance = SkeletalMeshComponent->GetAnimInstance();
return (AnimInstance == nullptr || SkeletalMeshComponent->GetAnimationMode() != EAnimationMode::AnimationBlueprint ||
AnimInstance->GetClass() != SkeletalMeshComponent->AnimClass || !SkeletalMesh->GetSkeleton()->IsCompatible(AnimInstance->CurrentSkeleton));
}