You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
63 lines
2.0 KiB
C++
63 lines
2.0 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "BoneContainer.h"
|
|
#include "BonePose.h"
|
|
#include "BoneControllers/AnimNode_SkeletalControlBase.h"
|
|
#include "AnimNode_CopyBone.generated.h"
|
|
|
|
class USkeletalMeshComponent;
|
|
|
|
/**
|
|
* Simple controller to copy a bone's transform to another one.
|
|
*/
|
|
|
|
USTRUCT(BlueprintInternalUseOnly)
|
|
struct ANIMGRAPHRUNTIME_API FAnimNode_CopyBone : public FAnimNode_SkeletalControlBase
|
|
{
|
|
GENERATED_USTRUCT_BODY()
|
|
|
|
/** Source Bone Name to get transform from */
|
|
UPROPERTY(EditAnywhere, Category = Copy)
|
|
FBoneReference SourceBone;
|
|
|
|
/** Name of bone to control. This is the main bone chain to modify from. **/
|
|
UPROPERTY(EditAnywhere, Category=Copy)
|
|
FBoneReference TargetBone;
|
|
|
|
/** If Translation should be copied */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Copy, meta=(PinShownByDefault))
|
|
bool bCopyTranslation;
|
|
|
|
/** If Rotation should be copied */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Copy, meta=(PinShownByDefault))
|
|
bool bCopyRotation;
|
|
|
|
/** If Scale should be copied */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Copy, meta=(PinShownByDefault))
|
|
bool bCopyScale;
|
|
|
|
/** Space to convert transforms into prior to copying components */
|
|
UPROPERTY(EditAnywhere, Category = Copy)
|
|
TEnumAsByte<EBoneControlSpace> ControlSpace;
|
|
|
|
FAnimNode_CopyBone();
|
|
|
|
// FAnimNode_Base interface
|
|
virtual void GatherDebugData(FNodeDebugData& DebugData) override;
|
|
// End of FAnimNode_Base interface
|
|
|
|
// FAnimNode_SkeletalControlBase interface
|
|
virtual void EvaluateSkeletalControl_AnyThread(FComponentSpacePoseContext& Output, TArray<FBoneTransform>& OutBoneTransforms) override;
|
|
virtual bool IsValidToEvaluate(const USkeleton* Skeleton, const FBoneContainer& RequiredBones) override;
|
|
// End of FAnimNode_SkeletalControlBase interface
|
|
|
|
private:
|
|
// FAnimNode_SkeletalControlBase interface
|
|
virtual void InitializeBoneReferences(const FBoneContainer& RequiredBones) override;
|
|
// End of FAnimNode_SkeletalControlBase interface
|
|
};
|