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 "AnimGraphNode_SkeletalControlBase.h"
|
2015-06-10 10:57:15 -04:00
|
|
|
#include "BoneControllers/AnimNode_ModifyBone.h"
|
2014-09-04 11:25:05 -04:00
|
|
|
#include "EdGraph/EdGraphNodeUtils.h" // for FNodeTitleTextTable
|
2014-03-14 14:13:41 -04:00
|
|
|
#include "AnimGraphNode_ModifyBone.generated.h"
|
|
|
|
|
|
2015-06-10 22:12:25 -04:00
|
|
|
UCLASS(meta=(Keywords = "Modify Transform"))
|
|
|
|
|
class ANIMGRAPH_API UAnimGraphNode_ModifyBone : public UAnimGraphNode_SkeletalControlBase
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2015-03-17 05:38:32 -04:00
|
|
|
GENERATED_UCLASS_BODY()
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category=Settings)
|
|
|
|
|
FAnimNode_ModifyBone Node;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
// UEdGraphNode interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
|
2014-09-03 18:14:09 -04:00
|
|
|
virtual FText GetTooltipText() const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of UEdGraphNode interface
|
|
|
|
|
|
|
|
|
|
protected:
|
2015-06-17 15:28:02 -04:00
|
|
|
// UAnimGraphNode_Base interface
|
|
|
|
|
virtual void ValidateAnimNodeDuringCompilation(USkeleton* ForSkeleton, FCompilerResultsLog& MessageLog) override;
|
|
|
|
|
// End of UAnimGraphNode_Base interface
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
// UAnimGraphNode_SkeletalControlBase interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual FText GetControllerDescription() const override;
|
2015-06-25 17:57:56 -04:00
|
|
|
virtual int32 GetWidgetCoordinateSystem(const USkeletalMeshComponent* SkelComp) override;
|
2015-06-10 22:12:25 -04:00
|
|
|
virtual FVector GetWidgetLocation(const USkeletalMeshComponent* SkelComp, struct FAnimNode_SkeletalControlBase* AnimNode) override;
|
|
|
|
|
virtual int32 GetWidgetMode(const USkeletalMeshComponent* SkelComp) override;
|
|
|
|
|
virtual int32 ChangeToNextWidgetMode(const USkeletalMeshComponent* SkelComp, int32 InCurWidgetMode) override;
|
|
|
|
|
virtual bool SetWidgetMode(const USkeletalMeshComponent* SkelComp, int32 InWidgetMode) override;
|
|
|
|
|
virtual FName FindSelectedBone() override;
|
|
|
|
|
virtual void DoTranslation(const USkeletalMeshComponent* SkelComp, FVector& Drag, FAnimNode_Base* InOutAnimNode) override;
|
|
|
|
|
virtual void DoRotation(const USkeletalMeshComponent* SkelComp, FRotator& Rotation, FAnimNode_Base* InOutAnimNode) override;
|
|
|
|
|
virtual void DoScale(const USkeletalMeshComponent* SkelComp, FVector& Drag, FAnimNode_Base* InOutAnimNode) override;
|
|
|
|
|
virtual void CopyNodeDataTo(FAnimNode_Base* OutAnimNode) override;
|
|
|
|
|
virtual void CopyNodeDataFrom(const FAnimNode_Base* InNewAnimNode) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of UAnimGraphNode_SkeletalControlBase interface
|
2014-09-04 11:25:05 -04:00
|
|
|
|
2014-11-14 05:00:37 -05:00
|
|
|
// methods to find a valid widget mode for gizmo because doesn't need to show gizmo when the mode is "Ignore"
|
2014-11-14 10:55:42 -05:00
|
|
|
int32 FindValidWidgetMode(int32 InWidgetMode);
|
|
|
|
|
EBoneModificationMode GetBoneModificationMode(int32 InWidgetMode);
|
|
|
|
|
int32 GetNextWidgetMode(int32 InWidgetMode);
|
2014-11-14 05:00:37 -05:00
|
|
|
|
2014-09-04 11:25:05 -04:00
|
|
|
private:
|
|
|
|
|
/** Constructing FText strings can be costly, so we cache the node's title */
|
|
|
|
|
FNodeTitleTextTable CachedNodeTitles;
|
2014-11-14 05:00:37 -05:00
|
|
|
|
2014-11-14 10:55:42 -05:00
|
|
|
// storing current widget mode
|
|
|
|
|
int32 CurWidgetMode;
|
2014-03-14 14:13:41 -04:00
|
|
|
};
|
2014-09-04 11:25:05 -04:00
|
|
|
|