Files
UnrealEngineUWP/Engine/Source/Editor/AnimGraph/Private/AnimBlueprintGeneratedClassCompiledData.cpp
Thomas Sarkanen 8b3709fb28 Restricted anim BP compiler subsystem APIs
Removed direct access to currently compiling BP class to restrict unguarded mutation.
Const-corrected various accessors and overrides.
Moved UObject-based compiler subsystems to 'handlers' and removed UObject dependency.
Moved from set of virtual functions on subsystems/handlers to a restricted set of contexts passed to specific multicast delegates that handlers subscribe to.
Removed anim class subsystems.
Moved property access code to engine module (editor code is still in a plugin).
Fixed nativized builds where anim BPs have nativized/non-nativized classes in the hierarchy

#rb Dan.OConnor
#jira none

[CL 14278258 by Thomas Sarkanen in ue5-main branch]
2020-09-09 08:32:25 -04:00

72 lines
2.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "AnimBlueprintGeneratedClassCompiledData.h"
#include "Animation/AnimBlueprintGeneratedClass.h"
TArray<FBakedAnimationStateMachine>& FAnimBlueprintGeneratedClassCompiledData::GetBakedStateMachines() const
{
return Class->BakedStateMachines;
}
TMap<FName, FCachedPoseIndices>& FAnimBlueprintGeneratedClassCompiledData::GetOrderedSavedPoseIndicesMap() const
{
return Class->OrderedSavedPoseIndicesMap;
}
FBlueprintDebugData& FAnimBlueprintGeneratedClassCompiledData::GetBlueprintDebugData() const
{
return Class->DebugData;
}
int32 FAnimBlueprintGeneratedClassCompiledData::FindOrAddNotify(FAnimNotifyEvent& Notify) const
{
if ((Notify.NotifyName == NAME_None) && (Notify.Notify == nullptr) && (Notify.NotifyStateClass == nullptr))
{
// Non event, don't add it
return INDEX_NONE;
}
int32 NewIndex = INDEX_NONE;
for (int32 NotifyIdx = 0; NotifyIdx < Class->AnimNotifies.Num(); NotifyIdx++)
{
if( (Class->AnimNotifies[NotifyIdx].NotifyName == Notify.NotifyName)
&& (Class->AnimNotifies[NotifyIdx].Notify == Notify.Notify)
&& (Class->AnimNotifies[NotifyIdx].NotifyStateClass == Notify.NotifyStateClass)
)
{
NewIndex = NotifyIdx;
break;
}
}
if (NewIndex == INDEX_NONE)
{
NewIndex = Class->AnimNotifies.Add(Notify);
}
return NewIndex;
}
TArray<FAnimNotifyEvent>& FAnimBlueprintGeneratedClassCompiledData::GetAnimNotifies() const
{
return Class->AnimNotifies;
}
TArray<FExposedValueHandler>& FAnimBlueprintGeneratedClassCompiledData::GetExposedValueHandlers() const
{
return Class->EvaluateGraphExposedInputs;
}
FPropertyAccessLibrary& FAnimBlueprintGeneratedClassCompiledData::GetPropertyAccessLibrary() const
{
return Class->PropertyAccessLibrary;
}
FAnimBlueprintDebugData& FAnimBlueprintGeneratedClassCompiledData::GetAnimBlueprintDebugData() const
{
return Class->AnimBlueprintDebugData;
}
TMap<FName, FGraphAssetPlayerInformation>& FAnimBlueprintGeneratedClassCompiledData::GetGraphAssetPlayerInformation() const
{
return Class->GraphAssetPlayerInformation;
}