You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Also fixes type conversions (first time I have tried to convert to a base class and found that my IsChildOf check was the wrong way around). Plus some extra accessors added for exec/update contexts. Found the need for these when doing show & tell prep. #rb Jurre.deBaare [CL 17367354 by Thomas Sarkanen in ue5-main branch]
49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#include "Kismet/BlueprintFunctionLibrary.h"
|
|
#include "Animation/AnimNodeReference.h"
|
|
#include "SkeletalControlLibrary.generated.h"
|
|
|
|
struct FAnimNode_SkeletalControlBase;
|
|
|
|
USTRUCT(BlueprintType)
|
|
struct FSkeletalControlReference : public FAnimNodeReference
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
typedef FAnimNode_SkeletalControlBase FInternalNodeType;
|
|
};
|
|
|
|
// Exposes operations to be performed on a skeletal control anim node
|
|
// Note: Experimental and subject to change!
|
|
UCLASS(Experimental)
|
|
class ANIMGRAPHRUNTIME_API USkeletalControlLibrary : public UBlueprintFunctionLibrary
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
/** Get a skeletal control from an anim node */
|
|
UFUNCTION(BlueprintCallable, Category = "Skeletal Control", meta=(BlueprintThreadSafe, ExpandEnumAsExecs = "Result"))
|
|
static FSkeletalControlReference ConvertToSkeletalControl(const FAnimNodeReference& Node, EAnimNodeReferenceConversionResult& Result);
|
|
|
|
/** Get a skeletal control from an anim node (pure) */
|
|
UFUNCTION(BlueprintPure, Category = "Skeletal Control", meta=(BlueprintThreadSafe, DisplayName = "Convert to Skeletal Control"))
|
|
static void ConvertToSkeletalControlPure(const FAnimNodeReference& Node, FSkeletalControlReference& SkeletalControl, bool& Result)
|
|
{
|
|
EAnimNodeReferenceConversionResult ConversionResult;
|
|
SkeletalControl = ConvertToSkeletalControl(Node, ConversionResult);
|
|
Result = (ConversionResult == EAnimNodeReferenceConversionResult::Succeeded);
|
|
}
|
|
|
|
/** Set the alpha value of this skeletal control */
|
|
UFUNCTION(BlueprintCallable, Category = "Skeletal Control", meta=(BlueprintThreadSafe))
|
|
static FSkeletalControlReference SetAlpha(const FSkeletalControlReference& SkeletalControl, float Alpha);
|
|
|
|
/** Get the alpha value of this skeletal control */
|
|
UFUNCTION(BlueprintPure, Category = "Skeletal Control", meta=(BlueprintThreadSafe))
|
|
static float GetAlpha(const FSkeletalControlReference& SkeletalControl);
|
|
}; |