2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-04-24 08:49:31 -04:00
|
|
|
#include "AnimationGraph.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#define LOCTEXT_NAMESPACE "AnimationGraph"
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
|
// UAnimationGraph
|
|
|
|
|
|
2014-10-14 10:29:11 -04:00
|
|
|
UAnimationGraph::UAnimationGraph(const FObjectInitializer& ObjectInitializer)
|
|
|
|
|
: Super(ObjectInitializer)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-06-22 08:24:00 -04:00
|
|
|
void UAnimationGraph::GetGraphNodesOfClass(TSubclassOf<UAnimGraphNode_Base> NodeClass, TArray<UAnimGraphNode_Base*>& GraphNodes, bool bIncludeChildClasses /*= true*/)
|
|
|
|
|
{
|
|
|
|
|
for (int32 NodeIndex = 0; NodeIndex < Nodes.Num(); ++NodeIndex)
|
|
|
|
|
{
|
|
|
|
|
UEdGraphNode* Node = Nodes[NodeIndex];
|
|
|
|
|
if (UAnimGraphNode_Base* TypedNode = Cast<UAnimGraphNode_Base>(Node))
|
|
|
|
|
{
|
|
|
|
|
UClass* TypedNodeClass = TypedNode->GetClass();
|
|
|
|
|
if (TypedNodeClass == NodeClass || (bIncludeChildClasses && TypedNode->GetClass()->IsChildOf(NodeClass)))
|
|
|
|
|
{
|
|
|
|
|
GraphNodes.Add(TypedNode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#undef LOCTEXT_NAMESPACE
|