Files
UnrealEngineUWP/Engine/Source/Runtime/AnimGraphRuntime/Public/LinkedAnimGraphLibrary.h
thomas sarkanen aa58e3e999 Updated categories of animation nodes & functions
Reorganized and consolidated for easier navigation

#rb Jurre.deBaare,Lucas.Dower
#jira UE-156715
#preflight 62a9ac0f13004691f97cd9da

#ROBOMERGE-OWNER: thomas.sarkanen
#ROBOMERGE-AUTHOR: thomas.sarkanen
#ROBOMERGE-SOURCE: CL 20667777 via CL 20668358 via CL 20668456 via CL 20668474
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20669758 by thomas sarkanen in ue5-main branch]
2022-06-15 10:37:36 -04:00

47 lines
2.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "Animation/AnimNodeReference.h"
#include "LinkedAnimGraphLibrary.generated.h"
struct FAnimNode_LinkedAnimGraph;
USTRUCT(BlueprintType)
struct FLinkedAnimGraphReference : public FAnimNodeReference
{
GENERATED_BODY()
typedef FAnimNode_LinkedAnimGraph FInternalNodeType;
};
// Exposes operations to be performed on anim node contexts
UCLASS()
class ANIMGRAPHRUNTIME_API ULinkedAnimGraphLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
/** Get a linked anim graph reference from an anim node reference */
UFUNCTION(BlueprintCallable, Category = "Animation|Linked Anim Graphs", meta=(BlueprintThreadSafe, ExpandEnumAsExecs = "Result"))
static FLinkedAnimGraphReference ConvertToLinkedAnimGraph(const FAnimNodeReference& Node, EAnimNodeReferenceConversionResult& Result);
/** Get a linked anim graph reference from an anim node reference (pure) */
UFUNCTION(BlueprintPure, Category = "Animation|Linked Anim Graphs", meta=(BlueprintThreadSafe, DisplayName = "Convert to Linked Anim Graph"))
static void ConvertToLinkedAnimGraphPure(const FAnimNodeReference& Node, FLinkedAnimGraphReference& LinkedAnimGraph, bool& Result)
{
EAnimNodeReferenceConversionResult ConversionResult;
LinkedAnimGraph = ConvertToLinkedAnimGraph(Node, ConversionResult);
Result = (ConversionResult == EAnimNodeReferenceConversionResult::Succeeded);
}
/** Returns whether the node hosts an instance (e.g. linked anim graph or layer) */
UFUNCTION(BlueprintPure, Category = "Animation|Linked Anim Graphs", meta=(BlueprintThreadSafe))
static bool HasLinkedAnimInstance(const FLinkedAnimGraphReference& Node);
/** Get the linked instance is hosted by this node. If the node does not host an instance then HasLinkedAnimInstance will return false */
UFUNCTION(BlueprintPure, Category = "Animation|Linked Anim Graphs", meta=(BlueprintThreadSafe))
static UAnimInstance* GetLinkedAnimInstance(const FLinkedAnimGraphReference& Node);
};