Files
UnrealEngineUWP/Engine/Source/Runtime/AnimGraphRuntime/Public/BoneControllers/AnimNode_CopyBone.h
Benn Gallagher c62cb8f218 Fixed confusing ordering of copy bone source and target bones
[CL 2616541 by Benn Gallagher in Main branch]
2015-07-10 08:44:53 -04:00

53 lines
1.8 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "AnimNode_SkeletalControlBase.h"
#include "AnimNode_CopyBone.generated.h"
/**
* Simple controller to copy a bone's transform to another one.
*/
USTRUCT()
struct ANIMGRAPHRUNTIME_API FAnimNode_CopyBone : public FAnimNode_SkeletalControlBase
{
GENERATED_USTRUCT_BODY()
/** Source Bone Name to get transform from */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Copy)
FBoneReference SourceBone;
/** 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();
// FAnimNode_Base interface
virtual void GatherDebugData(FNodeDebugData& DebugData) override;
// End of FAnimNode_Base interface
// FAnimNode_SkeletalControlBase interface
virtual void EvaluateBoneTransforms(USkeletalMeshComponent* SkelComp, FCSPose<FCompactPose>& MeshBases, 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
};