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]
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "SkeletalControlLibrary.h"
|
|
|
|
#include "BoneControllers/AnimNode_SkeletalControlBase.h"
|
|
|
|
DEFINE_LOG_CATEGORY_STATIC(LogSkeletalControlLibrary, Verbose, All);
|
|
|
|
FSkeletalControlReference USkeletalControlLibrary::ConvertToSkeletalControl(const FAnimNodeReference& Node, EAnimNodeReferenceConversionResult& Result)
|
|
{
|
|
return FAnimNodeReference::ConvertToType<FSkeletalControlReference>(Node, Result);
|
|
}
|
|
|
|
FSkeletalControlReference USkeletalControlLibrary::SetAlpha(const FSkeletalControlReference& SkeletalControl, float Alpha)
|
|
{
|
|
SkeletalControl.CallAnimNodeFunction<FAnimNode_SkeletalControlBase>(
|
|
TEXT("SetAlpha"),
|
|
[Alpha](FAnimNode_SkeletalControlBase& InSkeletalControl)
|
|
{
|
|
InSkeletalControl.SetAlpha(Alpha);
|
|
});
|
|
|
|
return SkeletalControl;
|
|
}
|
|
|
|
float USkeletalControlLibrary::GetAlpha(const FSkeletalControlReference& SkeletalControl)
|
|
{
|
|
float Alpha = 0.0f;
|
|
|
|
SkeletalControl.CallAnimNodeFunction<FAnimNode_SkeletalControlBase>(
|
|
TEXT("GetAlpha"),
|
|
[&Alpha](FAnimNode_SkeletalControlBase& InSkeletalControl)
|
|
{
|
|
Alpha = InSkeletalControl.GetAlpha();
|
|
});
|
|
|
|
return Alpha;
|
|
} |