2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "AnimNode_SkeletalControlBase.h"
|
|
|
|
|
#include "AnimNode_CopyBone.generated.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Simple controller to copy a bone's transform to another one.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
USTRUCT()
|
2015-06-10 10:57:15 -04:00
|
|
|
struct ANIMGRAPHRUNTIME_API FAnimNode_CopyBone : public FAnimNode_SkeletalControlBase
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-03-17 05:38:32 -04:00
|
|
|
GENERATED_USTRUCT_BODY()
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2015-07-10 08:44:53 -04:00
|
|
|
/** Source Bone Name to get transform from */
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Copy)
|
|
|
|
|
FBoneReference SourceBone;
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
/** Name of bone to control. This is the main bone chain to modify from. **/
|
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, 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;
|
|
|
|
|
|
|
|
|
|
FAnimNode_CopyBone();
|
|
|
|
|
|
2014-04-23 18:35:21 -04:00
|
|
|
// FAnimNode_Base interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void GatherDebugData(FNodeDebugData& DebugData) override;
|
2014-04-23 18:35:21 -04:00
|
|
|
// End of FAnimNode_Base interface
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
// FAnimNode_SkeletalControlBase interface
|
2015-05-19 06:19:22 -04:00
|
|
|
virtual void EvaluateBoneTransforms(USkeletalMeshComponent* SkelComp, FCSPose<FCompactPose>& MeshBases, TArray<FBoneTransform>& OutBoneTransforms) override;
|
2014-10-01 14:45:04 -04:00
|
|
|
virtual bool IsValidToEvaluate(const USkeleton* Skeleton, const FBoneContainer& RequiredBones) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of FAnimNode_SkeletalControlBase interface
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// FAnimNode_SkeletalControlBase interface
|
2014-10-01 14:45:04 -04:00
|
|
|
virtual void InitializeBoneReferences(const FBoneContainer& RequiredBones) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of FAnimNode_SkeletalControlBase interface
|
|
|
|
|
};
|